# load libraries
library(tidyverse)
library(psych)
library(langcog) # source: https://github.com/langcog/langcog
library(RColorBrewer)
library(plotly)
library(lubridate)
library(rms)
library(lme4)
# clear workspace
rm(list = ls(all = T))
graphics.off()
# make rounding function
round2 <- function(x) {format(round(x, 2), nsmall = 2)}
# make cleanup function
cleanup <- function(datasource, age_group) {
if(grepl("adult", age_group)) {
# set target dataset
if(datasource == "study 1"){d <- d_raw_study1}
if(datasource == "study 1b"){d <- d_raw_study1b}
if(datasource == "study 1c"){d <- d_raw_study1c}
# enact exclusionary criteria
d_clean_1 <- d
# recode background and demographic variables
d_clean <- d_clean_1 %>%
mutate( # deal with study number
study = factor(study)) %>%
mutate( # deal with race
race_cat2 = factor(sub(" +$", "", ethnicity)),
race_cat3 = factor(ifelse(grepl(" ", race_cat2) == T, "multiracial",
as.character(race_cat2)))) %>%
dplyr::select(study, subid:country_selfrep, age_group, race_cat3) %>%
rename(race_cat = race_cat3) %>%
mutate( # deal with religion (note: only dealing with childhood religion for now)
religion_cat2 = factor(sub(" +$", "", religionChild)),
religion_cat3 = factor(ifelse(grepl(" ", religion_cat2) == T,
"multireligious",
as.character(religion_cat2)))) %>%
dplyr::select(study:race_cat, religion_cat3) %>%
rename(religion_cat = religion_cat3)
# remove extraneous dfs and variables
rm(d, d_clean_1)
}
if(grepl("child", age_group)) {
# set target dataset
if(datasource == "study 2"){d <- d_raw_study2}
if(datasource == "study 3"){d <- d_raw_study3}
if(datasource == "study 4"){d <- d_raw_study4}
if(datasource == "study 5"){d <- d_raw_study5}
# recode background and demographic variables
d_clean_2 <- d %>%
mutate( # deal with study number
study = factor(study),
responseNum = ifelse(!is.na(responseNum), responseNum,
ifelse(response == "no", 0,
ifelse(response == "kinda", 0.5,
ifelse(response == "yes", 1, NA)))))
# NOTE: need to reconcile race/ethnicity at some point...
# NOTE: need to deal with gender at some point...
d_clean <- d_clean_2
# remove extraneous dfs and variables
rm(d, d_clean_2)
}
# remove outliers if desired
if(chosenOutlierHandling == "remove") {
d_clean <- d_clean %>%
gather(capacity, score, happy:pride) %>%
group_by(character, capacity) %>%
filter(!score %in% boxplot.stats(score, 2.5)$out) %>%
spread(capacity, score) %>%
arrange(character, subid)
}
# filter characters if desired
if(is.element("none", chosenExclude)) {} else {
d_clean <- d_clean %>%
filter(!character %in% chosenExclude)
}
# filter items if desired
if(is.element("none", chosenExcludeItem)) {} else {
d_clean <- d_clean %>%
dplyr::filter(!capacity %in% chosenExcludeItem)
}
# drop trials <250 ms
d_clean <- d_clean %>%
filter(rt >= 250 | is.na(rt))
# center response variable
if(datasource == "study 1b") {
d_clean <- d_clean %>%
mutate(responseNumC = responseNum - 4)
} else {
d_clean <- d_clean %>%
mutate(responseNumC = responseNum - 0.5)
}
# rename character name variables
if("charName" %in% names(d_clean)) {
d_clean <- d_clean %>% rename(character = charName)
}
# cleanup
d_clean <- d_clean %>%
filter(!is.na(subid), !is.na(character), !is.na(capacity))
# return cleaned dataset
return(d_clean)
}
# make function for stripping dataframes for dimension reducation
makeDRDF <- function(datasource, chosenCondition) {
# set target dataset
if(datasource == "study 1"){d <- d1}
if(datasource == "study 1b"){d <- d1b}
if(datasource == "study 1c"){d <- d1c}
if(datasource == "study 2"){d <- d2}
if(datasource == "study 3"){d <- d3}
if(datasource == "study 4"){d <- d4}
if(datasource == "study 5"){d <- d5}
# filter by character if specified
if(chosenCondition %in% c("beetle", "robot")) {
d <- d %>% filter(character == chosenCondition)
}
# make stripped dataframe for dimension reducation analyses
d_strip <- d %>%
filter(!is.na(character), !is.na(subid), !is.na(capacity), capacity != "") %>%
mutate(subid = paste(character, subid, sep = "_")) %>%
select(subid, capacity, responseNum) %>%
spread(capacity, responseNum) %>%
remove_rownames() %>%
column_to_rownames(var = "subid")
# return stripped dataframe
return(d_strip)
}
# make demographics functions
demoSampleSize <- function(datasource) {
# set target dataset
if(datasource == "study 1"){d <- d1}
if(datasource == "study 1b"){d <- d1b}
if(datasource == "study 1c"){d <- d1c}
if(datasource == "study 2"){d <- d2}
if(datasource == "study 3"){d <- d3}
if(datasource == "study 4"){d <- d4}
if(datasource == "study 5"){d <- d5}
# get distinct subids
sample_size <- d %>% distinct(subid, character) %>% count(character) %>% data.frame()
# add total sample size
sample_size <- rbind(sample_size %>% mutate(character = as.character(character)),
c(character = "all", n = d %>% distinct(subid) %>% count() %>% as.numeric()))
# return dataframe
return(sample_size)
}
demoDuration <- function(datasource) {
# set target dataset
if(datasource == "study 1"){d <- d1}
if(datasource == "study 1b"){d <- d1b}
if(datasource == "study 1c"){d <- d1c}
if(datasource == "study 2"){d <- d2}
if(datasource == "study 3"){d <- d3}
if(datasource == "study 4"){d <- d4}
if(datasource == "study 5"){d <- d5}
# get sample size per character
duration <- d %>%
distinct(subid, character, duration) %>%
mutate(duration = as.numeric(duration)) %>%
group_by(character) %>%
summarise(min_duration = min(duration, na.rm = T),
max_duration = max(duration, na.rm = T),
median_duration = median(duration, na.rm = T),
mean_duration = mean(duration, na.rm = T),
sd_duration = sd(duration, na.rm = T))
# add total duration
all <- d %>%
distinct(subid, character, duration) %>%
mutate(duration = as.numeric(duration)) %>%
summarise(min_duration = min(duration, na.rm = T),
max_duration = max(duration, na.rm = T),
median_duration = median(duration, na.rm = T),
mean_duration = mean(duration, na.rm = T),
sd_duration = sd(duration, na.rm = T)) %>%
mutate(character = "all")
duration <- rbind(duration, all) # not sure why full_join doesn't work
# return dataframe
return(duration)
}
demoAge <- function(datasource) {
# set target dataset
if(datasource == "study 1"){d <- d1}
if(datasource == "study 1b"){d <- d1b}
if(datasource == "study 1c"){d <- d1c}
if(datasource == "study 2"){d <- d2}
if(datasource == "study 3"){d <- d3}
if(datasource == "study 4"){d <- d4}
if(datasource == "study 5"){d <- d5}
# get sample size per character
age <- d %>%
distinct(subid, character, age) %>%
mutate(age = as.numeric(age)) %>%
group_by(character) %>%
summarise(min_age = min(age, na.rm = T),
max_age = max(age, na.rm = T),
median_age = median(age, na.rm = T),
mean_age = mean(age, na.rm = T),
sd_age = sd(age, na.rm = T))
# add total age
all <- d %>%
distinct(subid, character, age) %>%
mutate(age = as.numeric(age)) %>%
summarise(min_age = min(age, na.rm = T),
max_age = max(age, na.rm = T),
median_age = median(age, na.rm = T),
mean_age = mean(age, na.rm = T),
sd_age = sd(age, na.rm = T)) %>%
mutate(character = "all")
age <- full_join(age, all)
# return dataframe
return(age)
}
demoGender <- function(datasource) {
# set target dataset
if(datasource == "study 1"){d <- d1}
if(datasource == "study 1b"){d <- d1b}
if(datasource == "study 1c"){d <- d1c}
if(datasource == "study 2"){d <- d2}
if(datasource == "study 3"){d <- d3}
if(datasource == "study 4"){d <- d4}
if(datasource == "study 5"){d <- d5}
# get gender per character and overall
gender <- data.frame(addmargins(with(d %>% distinct(subid, character, gender),
table(character, gender)))) %>%
filter(gender != "Sum") %>%
rename(n = Freq)
gender <- gender %>%
mutate(character = factor(ifelse(character == "Sum",
"all", as.character(character)),
levels = c("beetle", "robot", "all"))) %>%
arrange(character, gender) %>%
spread(gender, n)
# return dataframe
return(gender)
}
demoRace <- function(datasource) {
# set target dataset
if(datasource == "study 1"){d <- d1}
if(datasource == "study 1b"){d <- d1b}
if(datasource == "study 1c"){d <- d1c}
if(datasource == "study 2"){d <- d2}
if(datasource == "study 3"){d <- d3}
if(datasource == "study 4"){d <- d4}
if(datasource == "study 5"){d <- d5}
# get race per character and overall
race <- data.frame(addmargins(with(d %>% distinct(subid, character, race_cat),
table(character, race_cat)))) %>%
filter(race_cat != "Sum") %>%
rename(n = Freq)
race <- race %>%
mutate(character = factor(ifelse(character == "Sum",
"all", as.character(character)))) %>%
arrange(character, race_cat) %>%
spread(race_cat, n)
# return dataframe
return(race)
}
# plotting functions
makeFacetLabs <- function(df_plotting) {
facet_labels <- array()
df_plotting <- df_plotting %>% mutate(character = factor(character))
for(i in 1:length(levels(df_plotting$character))) {
df <- df_plotting %>% filter(character == levels(df_plotting$character)[i]) %>%
select(character, n) %>% unique()
facet_labels[i] <- paste0(df$character, " (n = ", df$n, ")")
}
names(facet_labels) <- levels(df_plotting$character)
return(facet_labels)
}
# remove outliers?
chosenOutlierHandling <- "keep"
# chosenOutlierHandling <- "remove"
# exclude any conditions (characters)?
chosenExclude <- "none"
# chosenExclude <- c("stapler", "car", "computer")
# exclude any items (mental capacities)?
# chosenExcludeItem <- "none"
# chosenExcludeItem <- "computations"
chosenExcludeItem <- c("metal", "on_off")
# NOTE: always choose minimal residual (fm = "minres") instead of ML because of non-normality
# for EFAs, what kind of correlation?
chosenCorType <- "cor" # pearson correlation
# chosenCorType <- "poly" # polychoric correlation
# for EFAs, what kind of rotation?
# chosenRotType <- "varimax" # varimax rotation
chosenRotType <- "oblimin" # oblimin rotation
# chosenRotType <- "none" # no rotation
data.frame("conditionsExcluded" = chosenExclude,
"outlierHandling" = chosenOutlierHandling,
"EFA_correlation" = chosenCorType,
"EFA_rotation" = chosenRotType)
# study 1 (2016-07-06, adults, 2 conditions, 3-point scale, "decide what to do" and "make plans")
d_raw_study1 <- read.csv("/Users/kweisman/Documents/Research (Stanford)/Projects/Dimkid/dimkid/data/adults/us_run-01_2016-06-05_anonymized.csv") %>%
mutate(study = "study 1", age_group = "adults") %>% select(-X)
# study 1b (2017-07-19, adults, 2 conditions, 7-point scale, "decide what to do" and "make plans")
d_raw_study1b <- read.csv("/Users/kweisman/Documents/Research (Stanford)/Projects/Dimkid/dimkid/data/adults/us_run-02_2016-07-19_anonymized.csv") %>%
mutate(study = "study 1b", age_group = "adults") %>% select(-X)
# study 1c (2016-12-08, adults, 2 conditions, 3-point scale, "have free will" and "have intentions")
d_raw_study1c <- read.csv("/Users/kweisman/Documents/Research (Stanford)/Projects/Dimkid/dimkid/data/adults/us_run-03_2016-12-08_anonymized.csv") %>%
mutate(study = "study 1c", age_group = "adults") %>% select(-X)
# study 2 (June - December 2016, 7-9yo, 2 conditions, 3-point-scale, "decide what to do" and "make plans")
d_raw_study2 <- read.csv("/Users/kweisman/Documents/Research (Stanford)/Projects/Dimkid/dimkid/data/children/run-01_2017-07-24_anonymized.csv") %>%
mutate(study = "study 2", age_group = "children_79") %>% select(-X)
# study 3 (January - June 2017, 7-9yo, 9 conditions, 3-point-scale, "decide what to do" and "make plans")
d_raw_study3 <- read.csv("/Users/kweisman/Documents/Research (Stanford)/Projects/Dimkid/dimkid/data/children/run-02_2017-08-08_anonymized.csv") %>%
mutate(study = "study 3", age_group = "children_79") %>% select(-X) %>%
mutate(dob = parse_datetime(dateOfBirth, "%m/%d/%y"),
dot = parse_datetime(gsub("2017", "17", dateOfTest), "%m/%d/%y"),
age = interval(start = dob, end = dot) / duration(num = 1, units = "years")) %>%
select(-dateOfBirth, -dateOfTest, -dob, -dot)
220 parsing failures.
row # A tibble: 5 x 4 col row col expected actual expected <int> <int> <chr> <chr> actual 1 301 NA date like %m/%d/%y Jun-07 row 2 302 NA date like %m/%d/%y Jun-07 col 3 303 NA date like %m/%d/%y Jun-07 expected 4 304 NA date like %m/%d/%y Jun-07 actual 5 305 NA date like %m/%d/%y Jun-07
... ................. ... ....................................... ........ ....................................... ...... ....................................... ... ....................................... ... ....................................... ........ ....................................... ...... .......................................
See problems(...) for more details.
# study 4 (May 2017 - present, 4-6yo, 9 conditions, 3-point-scale, "decide what to do" and "make plans")
d_raw_study4 <- read.csv("/Users/kweisman/Documents/Research (Stanford)/Projects/Dimkid/dimkid/data/children/run-03_2017-08-21_anonymized.csv") %>%
mutate(study = "study 4", age_group = "children_46") %>% select(-X) %>%
mutate(dob = parse_datetime(dateOfBirth, "%m/%d/%y"),
dot = parse_datetime(gsub("2017", "17", dateOfTest), "%m/%d/%y"),
age = interval(start = dob, end = dot) / duration(num = 1, units = "years")) %>%
select(-dateOfBirth, -dateOfTest, -dob, -dot)
20 parsing failures.
row # A tibble: 5 x 4 col row col expected actual expected <int> <int> <chr> <chr> actual 1 2229 NA date like %m/%d/%y **parent but birth date as 8/23/17 row 2 2230 NA date like %m/%d/%y **parent but birth date as 8/23/17 col 3 2231 NA date like %m/%d/%y **parent but birth date as 8/23/17 expected 4 2232 NA date like %m/%d/%y **parent but birth date as 8/23/17 actual 5 2233 NA date like %m/%d/%y **parent but birth date as 8/23/17
... ................. ... ................................................................... ........ ................................................................... ...... ................................................................... ... ................................................................... ... ................................................................... ........ ................................................................... ...... ...................................................................
See problems(...) for more details.
# study 5 (Fall 2017 - present, 5.5-7.5yo (plus), 9 conditions, 3-point-scale, "decide what to do" and "make plans")
d_raw_study5 <- read.csv("/Users/kweisman/Documents/Research (Stanford)/Projects/Dimkid/dimkid/data/children/run-04_2017-10-10_anonymized.csv") %>%
mutate(study = "study 5", age_group = "children_5.57.5") %>% select(-X) %>%
mutate(dob = parse_datetime(dateOfBirth, "%m/%d/%y"),
dot = parse_datetime(gsub("2017", "17", dateOfTest), "%m/%d/%y"),
age = interval(start = dob, end = dot) / duration(num = 1, units = "years")) %>%
select(-dateOfBirth, -dateOfTest, -dob, -dot)
# clean up datasets
d1 <- cleanup("study 1", "adults")
d1b <- cleanup("study 1", "adults")
d1c <- cleanup("study 1", "adults")
d2 <- cleanup("study 2", "children")
d3 <- cleanup("study 3", "children")
d4 <- cleanup("study 4", "children")
d5 <- cleanup("study 5", "children")
# tweak by hand
d2 <- d2 %>%
filter(!is.na(age)) %>%
filter(age >= 7, age < 10) %>%
filter(character != "elephant")
d3_outsideage <- d3 %>% filter(age < 7 | age >= 10) %>% distinct(subid)
d3 <- d3 %>%
filter(!is.na(character), character != "") %>%
filter(!subid %in% d3_outsideage$subid) %>%
# filter(age >= 7, age < 10) %>%
mutate(ethnicity = gsub(" SN", "", ethnicity)) %>%
mutate(race_cat = ifelse(grepl("bing", tolower(testingSite)),
ifelse(ethnicity == "A", "east_asian",
ifelse(ethnicity == "C" | ethnicity == "Cj", "white",
ifelse(ethnicity == "I", "south_asian",
ifelse(ethnicity == "ME", "middle_eastern",
ifelse(ethnicity == "Af", "black",
ifelse(ethnicity == "H", "hispanic",
ifelse(grepl(" ", ethnicity) |
grepl("/", ethnicity), "multiracial",
NA))))))),
ifelse(tolower(ethnicity) == "black or african american", "black",
ifelse(tolower(ethnicity) == "hispanic or latino/a", "hispanic",
ifelse(tolower(ethnicity) == "east asian", "east_asian",
ifelse(tolower(ethnicity) == "native american, american indian, or alaska native", "native_american",
ifelse(tolower(ethnicity) == "white" |
tolower(ethnicity) == "white, caucasian, or european american", "white",
ifelse(tolower(ethnicity) == "south or southeast asian" | tolower(ethnicity) == "south asian", "south_asian",
ifelse(tolower(ethnicity) == "" | is.na(ethnicity), NA, "multiracial")))))))))
d4 <- d4 %>%
filter(!is.na(character), character != "") %>%
filter(age >= 4, age < 7) %>%
mutate(ethnicity = gsub(" SN", "", ethnicity)) %>%
mutate(race_cat = ifelse(grepl("bing", tolower(testingSite)),
ifelse(ethnicity == "A", "east_asian",
ifelse(ethnicity == "C" | ethnicity == "Cj", "white",
ifelse(ethnicity == "I", "south_asian",
ifelse(ethnicity == "ME", "middle_eastern",
ifelse(ethnicity == "Af", "black",
ifelse(ethnicity == "H", "hispanic",
ifelse(grepl(" ", ethnicity) |
grepl("/", ethnicity), "multiracial",
NA))))))),
ifelse(tolower(ethnicity) == "black or african american", "black",
ifelse(tolower(ethnicity) == "hispanic or latino/a", "hispanic",
ifelse(tolower(ethnicity) == "east asian", "east_asian",
ifelse(tolower(ethnicity) == "native american, american indian, or alaska native", "native_american",
ifelse(tolower(ethnicity) == "white" |
tolower(ethnicity) == "white, caucasian, or european american", "white",
ifelse(tolower(ethnicity) == "south or southeast asian" | tolower(ethnicity) == "south asian", "south_asian",
ifelse(tolower(ethnicity) == "" | is.na(ethnicity), NA, "multiracial")))))))))
d5 <- d5 %>%
filter(!is.na(character), character != "") %>%
filter(age >= 5.5, age < 7.5) %>%
mutate(ethnicity = gsub(" SN", "", ethnicity)) %>%
mutate(race_cat = ifelse(grepl("bing", tolower(testingSite)),
ifelse(ethnicity == "A", "east_asian",
ifelse(ethnicity == "C" | ethnicity == "Cj", "white",
ifelse(ethnicity == "I", "south_asian",
ifelse(ethnicity == "ME", "middle_eastern",
ifelse(ethnicity == "Af", "black",
ifelse(ethnicity == "H", "hispanic",
ifelse(grepl(" ", ethnicity) |
grepl("/", ethnicity), "multiracial",
NA))))))),
ifelse(tolower(ethnicity) == "black or african american", "black",
ifelse(tolower(ethnicity) == "hispanic or latino/a", "hispanic",
ifelse(tolower(ethnicity) == "east asian", "east_asian",
ifelse(tolower(ethnicity) == "native american, american indian, or alaska native", "native_american",
ifelse(tolower(ethnicity) == "white" |
tolower(ethnicity) == "white, caucasian, or european american", "white",
ifelse(tolower(ethnicity) == "south or southeast asian" | tolower(ethnicity) == "south asian", "south_asian",
ifelse(tolower(ethnicity) == "" | is.na(ethnicity), NA, "multiracial")))))))))
# make dataframes for s1
# d1_beetle <- makeDRDF("study 1", "beetle")
# d1_robot <- makeDRDF("study 1", "robot")
d1_all <- makeDRDF("study 1", "all")
# make dataframes for follow-up studies to s1
d1b_all <- makeDRDF("study 1b", "all")
d1c_all <- makeDRDF("study 1c", "all")
# make dataframes for study 2
# d2_beetle <- makeDRDF("study 2", "beetle")
# d2_robot <- makeDRDF("study 2", "robot")
d2_all <- makeDRDF("study 2", "all")
# make dataframes for study 3
# d3_beetle <- makeDRDF("study 3", "beetle")
# d3_robot <- makeDRDF("study 3", "robot")
d3_all <- makeDRDF("study 3", "all")
# make dataframes for study 4
d4_all <- makeDRDF("study 4", "all")
For all studies we conduct exploratory factor analyses using Pearson correlations to find minimum residual solutions.
For each study, we first examine maximal unrotated and rotated solutions. To determine the maximum number of factors to extract, we use the following rule of thumb: With \(p\) observations per participant, we can extract a maximum of \(k\) factors, where \((p-k)*2 > p+k\), i.e., \(k < p/3\). Thus, with 40 mental capacity items, we can extract a maximum of 13 factors.
To determine how many factors to retain, we use the following preset retention criteria, considering the unrotated maximal solution (unless otherwise noted):
We then examine and interpret varimax-rotated solutions, extracting only the number of factors that meet these criteria.
Study information:
# make demographics tables
demoSampleSize("study 1")
demoDuration("study 1")
demoAge("study 1")
Joining, by = c("character", "min_age", "max_age", "median_age", "mean_age", "sd_age")
Column `character` joining factor and character vector, coercing into character vector
demoGender("study 1")
demoRace("study 1")
# # alternative methods of determining how many factors
# fa.parallel(d1_all)
# VSS(d1_all)
# run EFA without rotation with N factors
efa_d1_all_unrotated <- fa(d1_all, 13, rotate = "none",
cor = chosenCorType, fm = "minres")
print(efa_d1_all_unrotated)
Factor Analysis using method = minres
Call: fa(r = d1_all, nfactors = 13, rotate = "none", fm = "minres",
cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 MR7 MR8 MR9 MR10
angry 0.65 -0.04 -0.11 -0.03 0.05 0.22 -0.02 0.04 -0.10 0.17
beliefs 0.48 0.40 -0.16 -0.14 0.04 -0.38 0.18 0.09 0.07 0.04
calm 0.68 -0.17 0.01 -0.08 -0.08 0.04 0.08 0.10 -0.04 0.02
choices 0.37 0.34 0.36 -0.20 0.06 0.09 -0.25 -0.20 0.12 -0.05
communicating 0.11 0.62 0.18 0.14 -0.18 0.30 0.11 0.18 0.15 -0.05
computations -0.33 0.82 -0.07 0.14 -0.03 0.00 -0.02 0.04 0.03 0.00
conscious 0.44 0.10 0.44 -0.11 0.17 -0.11 -0.24 0.06 0.08 -0.19
depressed 0.74 0.04 -0.37 0.04 -0.14 0.04 -0.17 -0.04 -0.21 -0.05
depth 0.26 0.27 0.48 0.28 0.12 -0.09 -0.16 -0.09 0.04 -0.08
desires 0.66 -0.17 0.10 -0.02 -0.03 -0.02 0.35 -0.48 0.13 -0.14
disrespected 0.63 0.06 -0.35 0.16 0.07 0.07 -0.13 -0.03 -0.07 -0.03
embarrassed 0.52 0.14 -0.40 0.19 0.48 0.18 0.11 0.11 0.12 -0.03
emo_recog 0.37 0.39 -0.10 -0.10 0.01 -0.27 -0.09 0.10 0.04 0.08
fear 0.72 -0.39 0.14 0.03 -0.18 0.07 0.09 0.12 -0.03 0.13
free_will 0.31 0.30 0.32 -0.40 0.15 0.22 -0.07 -0.19 -0.05 0.27
goal 0.41 0.21 0.19 -0.11 0.07 -0.11 0.18 -0.08 0.02 -0.03
guilt 0.62 0.14 -0.41 0.21 0.43 0.14 0.04 0.02 0.08 0.00
happy 0.76 0.00 -0.33 -0.08 -0.22 0.08 -0.15 -0.03 -0.08 -0.04
hungry 0.55 -0.71 0.22 -0.03 0.08 -0.02 0.06 0.02 0.03 0.03
intentions 0.19 0.62 0.02 -0.16 0.01 0.07 0.26 0.00 -0.20 0.00
joy 0.76 0.01 -0.39 0.10 -0.17 -0.01 -0.08 -0.07 0.05 0.00
love 0.75 0.11 -0.28 0.09 -0.07 -0.09 -0.07 -0.14 -0.03 -0.08
morality 0.31 0.50 -0.13 0.02 -0.07 -0.19 0.08 0.05 -0.04 0.00
nauseated 0.65 -0.32 0.14 0.08 -0.16 0.05 0.01 -0.06 0.14 0.03
odors 0.49 -0.35 0.37 0.05 0.15 -0.09 -0.03 0.10 0.07 0.01
pain 0.63 -0.52 0.19 -0.01 -0.04 0.11 0.11 0.19 0.05 -0.01
personality 0.44 0.36 -0.19 -0.13 -0.03 -0.27 0.01 0.00 0.24 0.20
pleasure 0.69 -0.23 -0.07 0.15 -0.15 -0.08 -0.15 0.06 0.16 -0.06
pride 0.68 0.18 -0.42 0.08 0.04 0.04 0.01 -0.08 -0.14 0.05
reasoning 0.34 0.44 0.31 -0.16 0.01 0.21 -0.11 0.01 0.08 0.20
recognizing 0.10 0.76 0.12 0.13 -0.21 0.15 0.11 0.11 0.15 -0.02
remembering 0.14 0.66 0.16 0.10 -0.15 0.13 0.01 -0.05 0.03 -0.15
safe 0.71 -0.29 0.21 -0.12 -0.03 -0.06 0.04 0.06 -0.03 0.09
seeing 0.33 0.15 0.50 0.28 0.08 -0.03 -0.07 -0.01 -0.11 -0.01
self_aware 0.46 0.18 0.22 -0.30 0.09 0.00 0.12 0.13 -0.20 -0.28
self_restraint 0.43 0.35 -0.05 -0.15 0.04 -0.19 -0.08 0.07 0.00 0.02
sounds 0.27 0.20 0.42 0.38 -0.06 -0.02 0.06 -0.07 -0.11 0.12
temperature 0.30 0.19 0.46 0.40 0.05 -0.22 0.04 0.00 -0.26 0.12
thoughts 0.55 0.18 0.10 -0.37 -0.01 0.04 -0.04 0.10 -0.09 -0.15
tired 0.69 -0.34 0.23 0.07 -0.06 0.05 0.06 0.08 0.07 -0.07
MR11 MR12 MR13 h2 u2 com
angry 0.02 -0.20 -0.09 0.58 0.42 1.8
beliefs -0.06 -0.09 -0.04 0.64 0.36 4.0
calm -0.01 0.05 -0.07 0.54 0.46 1.3
choices 0.17 -0.07 -0.05 0.59 0.41 6.1
communicating -0.08 -0.01 -0.03 0.65 0.35 2.6
computations 0.03 -0.06 -0.03 0.81 0.19 1.4
conscious -0.15 -0.21 0.05 0.63 0.37 4.6
depressed -0.02 0.06 -0.03 0.79 0.21 2.0
depth -0.10 -0.13 -0.02 0.53 0.47 4.1
desires -0.08 0.02 -0.07 0.87 0.13 2.9
disrespected -0.07 -0.02 0.02 0.59 0.41 2.0
embarrassed 0.09 0.12 0.07 0.82 0.18 4.3
emo_recog -0.14 0.14 0.11 0.46 0.54 4.3
fear -0.04 -0.16 0.15 0.82 0.18 2.3
free_will 0.10 0.08 0.00 0.65 0.35 6.8
goal 0.07 -0.14 0.15 0.36 0.64 4.0
guilt -0.03 -0.03 -0.05 0.84 0.16 3.3
happy -0.08 -0.04 -0.08 0.80 0.20 1.8
hungry 0.05 0.07 0.01 0.88 0.12 2.2
intentions 0.09 -0.01 0.18 0.60 0.40 2.3
joy -0.03 0.09 -0.01 0.79 0.21 1.8
love 0.00 0.08 0.07 0.71 0.29 1.6
morality 0.18 -0.10 0.10 0.46 0.54 2.9
nauseated 0.03 0.04 0.05 0.61 0.39 2.0
odors -0.03 0.11 0.05 0.56 0.44 3.4
pain 0.09 -0.01 -0.14 0.80 0.20 2.7
personality -0.06 0.09 -0.17 0.59 0.41 5.2
pleasure 0.21 0.09 0.18 0.72 0.28 2.3
pride -0.06 -0.16 0.01 0.74 0.26 2.2
reasoning -0.21 0.09 0.12 0.60 0.40 5.4
recognizing 0.00 -0.02 -0.12 0.75 0.25 1.7
remembering 0.04 0.09 0.10 0.58 0.42 1.7
safe -0.13 -0.04 0.07 0.68 0.32 1.8
seeing 0.07 0.09 -0.08 0.50 0.50 3.1
self_aware -0.21 0.15 -0.07 0.60 0.40 5.6
self_restraint 0.17 -0.04 -0.14 0.43 0.57 3.5
sounds -0.07 0.08 0.01 0.48 0.52 4.0
temperature 0.09 0.06 -0.09 0.65 0.35 4.8
thoughts 0.19 0.09 -0.05 0.57 0.43 2.9
tired 0.09 -0.11 -0.05 0.70 0.30 2.0
MR1 MR2 MR3 MR4 MR5 MR6 MR7 MR8 MR9 MR10 MR11
SS loadings 11.03 5.51 3.15 1.29 0.87 0.84 0.64 0.56 0.51 0.46 0.43
Proportion Var 0.28 0.14 0.08 0.03 0.02 0.02 0.02 0.01 0.01 0.01 0.01
Cumulative Var 0.28 0.41 0.49 0.52 0.55 0.57 0.58 0.60 0.61 0.62 0.63
Proportion Explained 0.42 0.21 0.12 0.05 0.03 0.03 0.02 0.02 0.02 0.02 0.02
Cumulative Proportion 0.42 0.64 0.76 0.81 0.84 0.87 0.90 0.92 0.94 0.96 0.97
MR12 MR13
SS loadings 0.38 0.32
Proportion Var 0.01 0.01
Cumulative Var 0.64 0.65
Proportion Explained 0.01 0.01
Cumulative Proportion 0.99 1.00
Mean item complexity = 3.1
Test of the hypothesis that 13 factors are sufficient.
The degrees of freedom for the null model are 780 and the objective function was 27.45 with Chi Square of 5073.12
The degrees of freedom for the model are 338 and the objective function was 2.41
The root mean square of the residuals (RMSR) is 0.02
The df corrected root mean square of the residuals is 0.03
The harmonic number of observations is 196 with the empirical chi square 93.35 with prob < 1
The total number of observations was 200 with Likelihood Chi Square = 424.01 with prob < 0.001
Tucker Lewis Index of factoring reliability = 0.951
RMSEA index = 0.046 and the 90 % confidence intervals are 0.024 0.046
BIC = -1366.82
Fit based upon off diagonal values = 1
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.99 0.98 0.95 0.88 0.89 0.84
Multiple R square of scores with factors 0.98 0.95 0.91 0.77 0.79 0.70
Minimum correlation of possible factor scores 0.95 0.90 0.82 0.55 0.59 0.40
MR7 MR8 MR9 MR10 MR11 MR12
Correlation of scores with factors 0.83 0.85 0.78 0.75 0.73 0.74
Multiple R square of scores with factors 0.70 0.73 0.61 0.57 0.54 0.54
Minimum correlation of possible factor scores 0.39 0.45 0.23 0.14 0.08 0.08
MR13
Correlation of scores with factors 0.71
Multiple R square of scores with factors 0.50
Minimum correlation of possible factor scores 0.00
# examine eigenvalues and variance explained
efa_d1_all_unrotated_eigenvalues <- print(efa_d1_all_unrotated)$Vaccounted %>%
t() %>%
data.frame()
Factor Analysis using method = minres
Call: fa(r = d1_all, nfactors = 13, rotate = "none", fm = "minres",
cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 MR7 MR8 MR9 MR10
angry 0.65 -0.04 -0.11 -0.03 0.05 0.22 -0.02 0.04 -0.10 0.17
beliefs 0.48 0.40 -0.16 -0.14 0.04 -0.38 0.18 0.09 0.07 0.04
calm 0.68 -0.17 0.01 -0.08 -0.08 0.04 0.08 0.10 -0.04 0.02
choices 0.37 0.34 0.36 -0.20 0.06 0.09 -0.25 -0.20 0.12 -0.05
communicating 0.11 0.62 0.18 0.14 -0.18 0.30 0.11 0.18 0.15 -0.05
computations -0.33 0.82 -0.07 0.14 -0.03 0.00 -0.02 0.04 0.03 0.00
conscious 0.44 0.10 0.44 -0.11 0.17 -0.11 -0.24 0.06 0.08 -0.19
depressed 0.74 0.04 -0.37 0.04 -0.14 0.04 -0.17 -0.04 -0.21 -0.05
depth 0.26 0.27 0.48 0.28 0.12 -0.09 -0.16 -0.09 0.04 -0.08
desires 0.66 -0.17 0.10 -0.02 -0.03 -0.02 0.35 -0.48 0.13 -0.14
disrespected 0.63 0.06 -0.35 0.16 0.07 0.07 -0.13 -0.03 -0.07 -0.03
embarrassed 0.52 0.14 -0.40 0.19 0.48 0.18 0.11 0.11 0.12 -0.03
emo_recog 0.37 0.39 -0.10 -0.10 0.01 -0.27 -0.09 0.10 0.04 0.08
fear 0.72 -0.39 0.14 0.03 -0.18 0.07 0.09 0.12 -0.03 0.13
free_will 0.31 0.30 0.32 -0.40 0.15 0.22 -0.07 -0.19 -0.05 0.27
goal 0.41 0.21 0.19 -0.11 0.07 -0.11 0.18 -0.08 0.02 -0.03
guilt 0.62 0.14 -0.41 0.21 0.43 0.14 0.04 0.02 0.08 0.00
happy 0.76 0.00 -0.33 -0.08 -0.22 0.08 -0.15 -0.03 -0.08 -0.04
hungry 0.55 -0.71 0.22 -0.03 0.08 -0.02 0.06 0.02 0.03 0.03
intentions 0.19 0.62 0.02 -0.16 0.01 0.07 0.26 0.00 -0.20 0.00
joy 0.76 0.01 -0.39 0.10 -0.17 -0.01 -0.08 -0.07 0.05 0.00
love 0.75 0.11 -0.28 0.09 -0.07 -0.09 -0.07 -0.14 -0.03 -0.08
morality 0.31 0.50 -0.13 0.02 -0.07 -0.19 0.08 0.05 -0.04 0.00
nauseated 0.65 -0.32 0.14 0.08 -0.16 0.05 0.01 -0.06 0.14 0.03
odors 0.49 -0.35 0.37 0.05 0.15 -0.09 -0.03 0.10 0.07 0.01
pain 0.63 -0.52 0.19 -0.01 -0.04 0.11 0.11 0.19 0.05 -0.01
personality 0.44 0.36 -0.19 -0.13 -0.03 -0.27 0.01 0.00 0.24 0.20
pleasure 0.69 -0.23 -0.07 0.15 -0.15 -0.08 -0.15 0.06 0.16 -0.06
pride 0.68 0.18 -0.42 0.08 0.04 0.04 0.01 -0.08 -0.14 0.05
reasoning 0.34 0.44 0.31 -0.16 0.01 0.21 -0.11 0.01 0.08 0.20
recognizing 0.10 0.76 0.12 0.13 -0.21 0.15 0.11 0.11 0.15 -0.02
remembering 0.14 0.66 0.16 0.10 -0.15 0.13 0.01 -0.05 0.03 -0.15
safe 0.71 -0.29 0.21 -0.12 -0.03 -0.06 0.04 0.06 -0.03 0.09
seeing 0.33 0.15 0.50 0.28 0.08 -0.03 -0.07 -0.01 -0.11 -0.01
self_aware 0.46 0.18 0.22 -0.30 0.09 0.00 0.12 0.13 -0.20 -0.28
self_restraint 0.43 0.35 -0.05 -0.15 0.04 -0.19 -0.08 0.07 0.00 0.02
sounds 0.27 0.20 0.42 0.38 -0.06 -0.02 0.06 -0.07 -0.11 0.12
temperature 0.30 0.19 0.46 0.40 0.05 -0.22 0.04 0.00 -0.26 0.12
thoughts 0.55 0.18 0.10 -0.37 -0.01 0.04 -0.04 0.10 -0.09 -0.15
tired 0.69 -0.34 0.23 0.07 -0.06 0.05 0.06 0.08 0.07 -0.07
MR11 MR12 MR13 h2 u2 com
angry 0.02 -0.20 -0.09 0.58 0.42 1.8
beliefs -0.06 -0.09 -0.04 0.64 0.36 4.0
calm -0.01 0.05 -0.07 0.54 0.46 1.3
choices 0.17 -0.07 -0.05 0.59 0.41 6.1
communicating -0.08 -0.01 -0.03 0.65 0.35 2.6
computations 0.03 -0.06 -0.03 0.81 0.19 1.4
conscious -0.15 -0.21 0.05 0.63 0.37 4.6
depressed -0.02 0.06 -0.03 0.79 0.21 2.0
depth -0.10 -0.13 -0.02 0.53 0.47 4.1
desires -0.08 0.02 -0.07 0.87 0.13 2.9
disrespected -0.07 -0.02 0.02 0.59 0.41 2.0
embarrassed 0.09 0.12 0.07 0.82 0.18 4.3
emo_recog -0.14 0.14 0.11 0.46 0.54 4.3
fear -0.04 -0.16 0.15 0.82 0.18 2.3
free_will 0.10 0.08 0.00 0.65 0.35 6.8
goal 0.07 -0.14 0.15 0.36 0.64 4.0
guilt -0.03 -0.03 -0.05 0.84 0.16 3.3
happy -0.08 -0.04 -0.08 0.80 0.20 1.8
hungry 0.05 0.07 0.01 0.88 0.12 2.2
intentions 0.09 -0.01 0.18 0.60 0.40 2.3
joy -0.03 0.09 -0.01 0.79 0.21 1.8
love 0.00 0.08 0.07 0.71 0.29 1.6
morality 0.18 -0.10 0.10 0.46 0.54 2.9
nauseated 0.03 0.04 0.05 0.61 0.39 2.0
odors -0.03 0.11 0.05 0.56 0.44 3.4
pain 0.09 -0.01 -0.14 0.80 0.20 2.7
personality -0.06 0.09 -0.17 0.59 0.41 5.2
pleasure 0.21 0.09 0.18 0.72 0.28 2.3
pride -0.06 -0.16 0.01 0.74 0.26 2.2
reasoning -0.21 0.09 0.12 0.60 0.40 5.4
recognizing 0.00 -0.02 -0.12 0.75 0.25 1.7
remembering 0.04 0.09 0.10 0.58 0.42 1.7
safe -0.13 -0.04 0.07 0.68 0.32 1.8
seeing 0.07 0.09 -0.08 0.50 0.50 3.1
self_aware -0.21 0.15 -0.07 0.60 0.40 5.6
self_restraint 0.17 -0.04 -0.14 0.43 0.57 3.5
sounds -0.07 0.08 0.01 0.48 0.52 4.0
temperature 0.09 0.06 -0.09 0.65 0.35 4.8
thoughts 0.19 0.09 -0.05 0.57 0.43 2.9
tired 0.09 -0.11 -0.05 0.70 0.30 2.0
MR1 MR2 MR3 MR4 MR5 MR6 MR7 MR8 MR9 MR10 MR11
SS loadings 11.03 5.51 3.15 1.29 0.87 0.84 0.64 0.56 0.51 0.46 0.43
Proportion Var 0.28 0.14 0.08 0.03 0.02 0.02 0.02 0.01 0.01 0.01 0.01
Cumulative Var 0.28 0.41 0.49 0.52 0.55 0.57 0.58 0.60 0.61 0.62 0.63
Proportion Explained 0.42 0.21 0.12 0.05 0.03 0.03 0.02 0.02 0.02 0.02 0.02
Cumulative Proportion 0.42 0.64 0.76 0.81 0.84 0.87 0.90 0.92 0.94 0.96 0.97
MR12 MR13
SS loadings 0.38 0.32
Proportion Var 0.01 0.01
Cumulative Var 0.64 0.65
Proportion Explained 0.01 0.01
Cumulative Proportion 0.99 1.00
Mean item complexity = 3.1
Test of the hypothesis that 13 factors are sufficient.
The degrees of freedom for the null model are 780 and the objective function was 27.45 with Chi Square of 5073.12
The degrees of freedom for the model are 338 and the objective function was 2.41
The root mean square of the residuals (RMSR) is 0.02
The df corrected root mean square of the residuals is 0.03
The harmonic number of observations is 196 with the empirical chi square 93.35 with prob < 1
The total number of observations was 200 with Likelihood Chi Square = 424.01 with prob < 0.001
Tucker Lewis Index of factoring reliability = 0.951
RMSEA index = 0.046 and the 90 % confidence intervals are 0.024 0.046
BIC = -1366.82
Fit based upon off diagonal values = 1
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.99 0.98 0.95 0.88 0.89 0.84
Multiple R square of scores with factors 0.98 0.95 0.91 0.77 0.79 0.70
Minimum correlation of possible factor scores 0.95 0.90 0.82 0.55 0.59 0.40
MR7 MR8 MR9 MR10 MR11 MR12
Correlation of scores with factors 0.83 0.85 0.78 0.75 0.73 0.74
Multiple R square of scores with factors 0.70 0.73 0.61 0.57 0.54 0.54
Minimum correlation of possible factor scores 0.39 0.45 0.23 0.14 0.08 0.08
MR13
Correlation of scores with factors 0.71
Multiple R square of scores with factors 0.50
Minimum correlation of possible factor scores 0.00
# count factors with eigenvalues > 1 and variance explained > 5%
efa_d1_all_unrotated_nfactors <- efa_d1_all_unrotated_eigenvalues %>%
filter(SS.loadings > 1, Proportion.Explained > 0.05) %>%
count() %>%
as.numeric()
efa_d1_all_unrotated_nfactors
[1] 3
efa_d1_all_rotated_max <- fa(d1_all, 13, rotate = chosenRotType,
cor = chosenCorType, fm = "minres")
efa_d1_all_rotated <- fa(d1_all, efa_d1_all_unrotated_nfactors, rotate = chosenRotType,
cor = chosenCorType, fm = "minres")
# check that each of these factors is the dominant factor for at least one mental capacity item
efa_d1_all_rotated_loadings <- fa.sort(loadings(efa_d1_all_rotated)[]) %>%
data.frame() %>%
rownames_to_column("capacity") %>%
gather(factor, loading, -capacity) %>%
mutate(loading_abs = abs(loading)) %>%
group_by(capacity) %>%
top_n(1, loading_abs) %>%
ungroup()
efa_d1_all_rotated_loadings
# drop any factors where n < 1
efa_d1_all_rotated_loadings %>%
count(factor) %>%
filter(n > 0)
# set number of factors to extract
nfactors_d1_all <- efa_d1_all_rotated_loadings %>%
count(factor) %>%
filter(n > 0) %>%
nrow()
nfactors_d1_all
[1] 3
# run EFA with rotation with N factors
efa_d1_all_rotatedN <- fa(d1_all, nfactors_d1_all,
rotate = chosenRotType, cor = chosenCorType, fm = "minres")
print(efa_d1_all_rotatedN)
Factor Analysis using method = minres
Call: fa(r = d1_all, nfactors = nfactors_d1_all, rotate = chosenRotType,
fm = "minres", cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 h2 u2 com
angry 0.50 0.27 0.09 0.43 0.57 1.6
beliefs 0.53 -0.17 0.24 0.40 0.60 1.6
calm 0.39 0.45 0.12 0.50 0.50 2.1
choices 0.03 0.08 0.59 0.36 0.64 1.0
communicating 0.07 -0.33 0.53 0.41 0.59 1.7
computations 0.04 -0.83 0.33 0.80 0.20 1.3
conscious -0.05 0.34 0.54 0.37 0.63 1.7
depressed 0.81 0.10 -0.06 0.68 0.32 1.0
depth -0.17 0.15 0.62 0.35 0.65 1.3
desires 0.31 0.45 0.17 0.44 0.56 2.1
disrespected 0.72 0.05 -0.06 0.53 0.47 1.0
embarrassed 0.66 -0.06 -0.07 0.39 0.61 1.0
emo_recog 0.41 -0.18 0.26 0.29 0.71 2.1
fear 0.26 0.70 0.11 0.68 0.32 1.3
free_will 0.02 0.06 0.49 0.25 0.75 1.0
goal 0.15 0.12 0.41 0.25 0.75 1.4
guilt 0.75 -0.03 -0.05 0.53 0.47 1.0
happy 0.78 0.17 -0.04 0.68 0.32 1.1
hungry 0.00 0.93 -0.06 0.87 0.13 1.0
intentions 0.25 -0.38 0.43 0.41 0.59 2.6
joy 0.84 0.12 -0.09 0.73 0.27 1.1
love 0.76 0.10 0.06 0.66 0.34 1.0
morality 0.43 -0.32 0.28 0.36 0.64 2.6
nauseated 0.23 0.62 0.13 0.54 0.46 1.4
odors -0.08 0.69 0.25 0.50 0.50 1.3
pain 0.13 0.79 0.05 0.70 0.30 1.1
personality 0.52 -0.18 0.19 0.34 0.66 1.5
pleasure 0.44 0.44 0.02 0.51 0.49 2.0
pride 0.85 -0.06 -0.04 0.68 0.32 1.0
reasoning 0.07 -0.02 0.60 0.39 0.61 1.0
recognizing 0.14 -0.48 0.57 0.59 0.41 2.1
remembering 0.11 -0.37 0.56 0.48 0.52 1.8
safe 0.22 0.65 0.22 0.63 0.37 1.5
seeing -0.17 0.29 0.59 0.37 0.63 1.6
self_aware 0.15 0.18 0.40 0.27 0.73 1.7
self_restraint 0.40 -0.10 0.29 0.30 0.70 2.0
sounds -0.13 0.18 0.53 0.27 0.73 1.3
temperature -0.13 0.21 0.55 0.30 0.70 1.4
thoughts 0.31 0.16 0.34 0.33 0.67 2.4
tired 0.17 0.70 0.20 0.64 0.36 1.3
MR1 MR2 MR3
SS loadings 7.56 6.63 5.04
Proportion Var 0.19 0.17 0.13
Cumulative Var 0.19 0.35 0.48
Proportion Explained 0.39 0.34 0.26
Cumulative Proportion 0.39 0.74 1.00
With factor correlations of
MR1 MR2 MR3
MR1 1.00 0.28 0.30
MR2 0.28 1.00 -0.01
MR3 0.30 -0.01 1.00
Mean item complexity = 1.5
Test of the hypothesis that 3 factors are sufficient.
The degrees of freedom for the null model are 780 and the objective function was 27.45 with Chi Square of 5073.12
The degrees of freedom for the model are 663 and the objective function was 6.67
The root mean square of the residuals (RMSR) is 0.05
The df corrected root mean square of the residuals is 0.05
The harmonic number of observations is 196 with the empirical chi square 729.79 with prob < 0.036
The total number of observations was 200 with Likelihood Chi Square = 1219.34 with prob < 2.1e-35
Tucker Lewis Index of factoring reliability = 0.846
RMSEA index = 0.071 and the 90 % confidence intervals are 0.059 NA
BIC = -2293.44
Fit based upon off diagonal values = 0.98
Measures of factor score adequacy
MR1 MR2 MR3
Correlation of scores with factors 0.97 0.98 0.95
Multiple R square of scores with factors 0.95 0.96 0.89
Minimum correlation of possible factor scores 0.89 0.92 0.79
# get loadings for each factor
efa_d1_all_rotatedN_loadings <- loadings(efa_d1_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "capacity")
data.frame(loadings(fa.sort(efa_d1_all_rotatedN))[]) %>%
rownames_to_column("capacity") %>%
mutate_at(vars(starts_with("M")), funs(round2))
Study information:
# make demographics tables
demoSampleSize("study 2")
# demoDuration("study 2")
demoAge("study 2")
Joining, by = c("character", "min_age", "max_age", "median_age", "mean_age", "sd_age")
Column `character` joining factor and character vector, coercing into character vector
demoGender("study 2")
# demoRace("study 2")
# # alternative methods of determining how many factors
# fa.parallel(d2_all)
# VSS(d2_all)
# run EFA without rotation with N factors
efa_d2_all_unrotated <- fa(d2_all, 13, rotate = "none",
cor = chosenCorType, fm = "minres")
print(efa_d2_all_unrotated)
Factor Analysis using method = minres
Call: fa(r = d2_all, nfactors = 13, rotate = "none", fm = "minres",
cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 MR7 MR8 MR9 MR10
angry 0.57 -0.17 -0.04 -0.07 0.05 0.16 0.11 0.06 -0.04 0.01
beliefs 0.54 0.23 -0.07 -0.09 0.05 0.24 -0.12 -0.05 -0.01 0.13
calm 0.55 -0.07 0.01 0.02 -0.10 -0.09 -0.14 0.05 -0.01 -0.18
choices 0.43 0.05 0.26 -0.38 -0.07 0.20 -0.05 -0.13 0.11 0.05
communicating 0.09 0.30 0.16 0.30 -0.17 0.03 0.19 0.11 0.29 0.04
computations -0.01 0.80 -0.04 0.02 0.08 0.10 -0.09 0.03 0.10 -0.11
conscious 0.36 0.08 0.48 0.21 -0.14 0.01 0.16 -0.12 -0.27 -0.14
depressed 0.69 -0.11 -0.13 0.05 -0.06 -0.13 0.12 0.06 0.21 -0.09
depth 0.14 0.22 0.36 0.12 0.34 0.02 -0.14 -0.07 -0.02 0.02
desires 0.52 -0.19 -0.03 -0.01 -0.08 0.21 -0.07 -0.04 0.02 0.10
disrespected 0.69 0.00 -0.11 -0.07 -0.03 -0.02 0.16 -0.16 -0.09 0.03
embarrassed 0.53 0.03 -0.30 0.10 0.22 0.34 0.23 -0.06 -0.01 -0.03
emo_recog 0.34 0.50 -0.05 0.09 0.11 -0.07 0.22 0.14 -0.09 0.07
fear 0.55 -0.37 0.11 0.11 -0.08 0.03 0.01 0.17 0.09 0.03
free_will 0.49 0.00 0.32 -0.22 -0.09 0.11 -0.21 -0.18 0.08 0.03
goal 0.35 0.31 -0.03 -0.09 -0.06 0.10 -0.11 0.22 0.02 -0.18
guilt 0.58 0.07 -0.18 0.13 0.25 0.19 -0.07 -0.10 -0.07 -0.08
happy 0.72 0.09 -0.20 0.18 -0.20 -0.06 -0.01 -0.13 0.09 -0.03
hungry 0.38 -0.77 0.22 0.02 0.14 -0.04 0.01 -0.08 0.06 0.05
intentions 0.35 0.40 0.15 -0.24 0.11 0.03 0.02 -0.12 0.09 -0.14
joy 0.70 0.00 -0.26 0.10 -0.18 -0.10 -0.03 -0.05 0.06 -0.01
love 0.60 0.03 -0.20 0.11 0.03 -0.11 0.09 -0.19 -0.05 0.05
morality 0.44 0.37 -0.13 -0.08 0.21 -0.26 -0.05 0.26 -0.18 0.33
nauseated 0.30 -0.43 0.06 0.11 0.27 0.05 0.00 0.07 0.16 0.06
odors 0.15 -0.53 0.38 0.06 0.09 0.12 -0.06 0.16 0.06 0.03
pain 0.45 -0.64 0.21 -0.06 0.07 -0.09 -0.05 -0.04 -0.01 0.10
personality 0.54 0.29 -0.01 -0.12 0.20 0.12 0.01 0.18 -0.01 0.06
pleasure 0.60 0.04 -0.18 0.10 -0.23 -0.17 -0.31 0.04 0.01 -0.04
pride 0.68 0.14 -0.31 0.06 -0.05 -0.02 0.01 -0.04 -0.01 -0.04
reasoning 0.23 0.28 0.36 0.05 -0.16 -0.01 -0.05 0.01 0.05 0.12
recognizing 0.20 0.32 0.13 0.10 0.11 0.00 -0.11 0.21 0.06 0.00
remembering 0.06 0.58 0.17 0.13 -0.05 0.00 0.01 -0.17 0.19 0.28
safe 0.58 -0.08 0.23 0.06 -0.06 -0.06 -0.19 0.16 -0.24 0.00
seeing -0.07 0.13 0.26 -0.03 -0.19 -0.08 0.19 -0.08 0.02 0.27
self_aware 0.27 0.21 0.46 -0.03 -0.10 0.09 0.23 0.00 -0.31 -0.10
self_restraint 0.34 0.19 0.15 -0.56 0.11 -0.33 0.20 0.05 0.17 -0.16
sounds -0.07 0.10 0.40 0.10 -0.18 0.23 0.08 0.23 0.14 -0.08
temperature -0.05 0.34 0.41 0.31 0.34 -0.26 -0.15 -0.23 0.08 -0.15
thoughts 0.57 0.01 0.18 -0.05 -0.11 -0.16 -0.03 0.03 -0.09 0.03
tired 0.39 -0.35 0.07 0.11 0.16 -0.16 0.24 0.06 0.12 -0.07
MR11 MR12 MR13 h2 u2 com
angry -0.04 0.02 -0.16 0.44 0.56 1.7
beliefs 0.06 0.08 0.21 0.50 0.50 2.8
calm 0.10 -0.02 0.10 0.40 0.60 1.8
choices -0.15 0.16 -0.09 0.54 0.46 4.6
communicating 0.04 -0.02 -0.12 0.40 0.60 5.9
computations 0.08 0.10 0.00 0.71 0.29 1.2
conscious -0.04 -0.12 0.01 0.58 0.42 4.2
depressed -0.15 -0.01 0.00 0.63 0.37 1.7
depth 0.17 -0.15 -0.07 0.41 0.59 4.8
desires 0.03 -0.17 0.15 0.42 0.58 2.3
disrespected 0.10 0.09 0.08 0.58 0.42 1.4
embarrassed 0.02 -0.13 -0.05 0.63 0.37 3.7
emo_recog -0.02 0.13 0.05 0.49 0.51 3.1
fear -0.06 -0.25 -0.09 0.58 0.42 2.9
free_will -0.02 -0.03 -0.10 0.51 0.49 3.5
goal -0.25 -0.04 0.14 0.42 0.58 5.4
guilt 0.14 -0.05 -0.03 0.53 0.47 2.4
happy 0.12 0.05 -0.09 0.69 0.31 1.8
hungry 0.00 0.03 0.01 0.81 0.19 1.8
intentions 0.08 0.05 -0.12 0.43 0.57 4.2
joy 0.05 0.11 0.02 0.62 0.38 1.6
love 0.07 0.03 0.14 0.50 0.50 1.9
morality 0.07 0.03 -0.09 0.69 0.31 5.9
nauseated -0.10 0.02 0.08 0.42 0.58 3.6
odors 0.19 0.09 -0.06 0.55 0.45 3.0
pain -0.01 0.06 0.08 0.70 0.30 2.3
personality -0.09 0.00 0.09 0.50 0.50 2.6
pleasure 0.08 -0.09 -0.02 0.60 0.40 2.5
pride -0.03 0.01 -0.15 0.61 0.39 1.7
reasoning -0.06 -0.11 0.22 0.37 0.63 4.8
recognizing 0.04 -0.14 0.05 0.26 0.74 4.7
remembering -0.24 -0.03 -0.08 0.59 0.41 2.8
safe -0.10 0.09 -0.22 0.59 0.41 2.8
seeing 0.20 -0.08 0.02 0.30 0.70 6.0
self_aware -0.09 -0.03 0.01 0.52 0.48 4.2
self_restraint 0.15 -0.19 0.01 0.76 0.24 4.5
sounds 0.25 0.23 0.06 0.47 0.53 5.6
temperature -0.09 0.08 0.04 0.68 0.32 6.4
thoughts -0.03 0.15 0.08 0.44 0.56 1.8
tired -0.11 0.12 0.05 0.45 0.55 4.7
MR1 MR2 MR3 MR4 MR5 MR6 MR7 MR8 MR9 MR10 MR11
SS loadings 8.25 4.13 2.18 1.05 0.96 0.84 0.73 0.66 0.62 0.54 0.52
Proportion Var 0.21 0.10 0.05 0.03 0.02 0.02 0.02 0.02 0.02 0.01 0.01
Cumulative Var 0.21 0.31 0.36 0.39 0.41 0.44 0.45 0.47 0.49 0.50 0.51
Proportion Explained 0.39 0.19 0.10 0.05 0.05 0.04 0.03 0.03 0.03 0.03 0.02
Cumulative Proportion 0.39 0.58 0.68 0.73 0.78 0.82 0.85 0.88 0.91 0.94 0.96
MR12 MR13
SS loadings 0.44 0.40
Proportion Var 0.01 0.01
Cumulative Var 0.52 0.53
Proportion Explained 0.02 0.02
Cumulative Proportion 0.98 1.00
Mean item complexity = 3.4
Test of the hypothesis that 13 factors are sufficient.
The degrees of freedom for the null model are 780 and the objective function was 17.08 with Chi Square of 3157.08
The degrees of freedom for the model are 338 and the objective function was 1.79
The root mean square of the residuals (RMSR) is 0.02
The df corrected root mean square of the residuals is 0.03
The harmonic number of observations is 198 with the empirical chi square 142.71 with prob < 1
The total number of observations was 200 with Likelihood Chi Square = 314.7 with prob < 0.81
Tucker Lewis Index of factoring reliability = 1.024
RMSEA index = 0.016 and the 90 % confidence intervals are 0 0.018
BIC = -1476.13
Fit based upon off diagonal values = 0.99
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.98 0.96 0.91 0.86 0.83 0.83
Multiple R square of scores with factors 0.95 0.93 0.83 0.74 0.69 0.68
Minimum correlation of possible factor scores 0.90 0.86 0.67 0.48 0.38 0.36
MR7 MR8 MR9 MR10 MR11 MR12
Correlation of scores with factors 0.79 0.77 0.77 0.75 0.73 0.71
Multiple R square of scores with factors 0.62 0.60 0.59 0.56 0.53 0.50
Minimum correlation of possible factor scores 0.23 0.19 0.18 0.12 0.06 0.00
MR13
Correlation of scores with factors 0.67
Multiple R square of scores with factors 0.45
Minimum correlation of possible factor scores -0.10
# examine eigenvalues and variance explained
efa_d2_all_unrotated_eigenvalues <- print(efa_d2_all_unrotated)$Vaccounted %>%
t() %>%
data.frame()
Factor Analysis using method = minres
Call: fa(r = d2_all, nfactors = 13, rotate = "none", fm = "minres",
cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 MR7 MR8 MR9 MR10
angry 0.57 -0.17 -0.04 -0.07 0.05 0.16 0.11 0.06 -0.04 0.01
beliefs 0.54 0.23 -0.07 -0.09 0.05 0.24 -0.12 -0.05 -0.01 0.13
calm 0.55 -0.07 0.01 0.02 -0.10 -0.09 -0.14 0.05 -0.01 -0.18
choices 0.43 0.05 0.26 -0.38 -0.07 0.20 -0.05 -0.13 0.11 0.05
communicating 0.09 0.30 0.16 0.30 -0.17 0.03 0.19 0.11 0.29 0.04
computations -0.01 0.80 -0.04 0.02 0.08 0.10 -0.09 0.03 0.10 -0.11
conscious 0.36 0.08 0.48 0.21 -0.14 0.01 0.16 -0.12 -0.27 -0.14
depressed 0.69 -0.11 -0.13 0.05 -0.06 -0.13 0.12 0.06 0.21 -0.09
depth 0.14 0.22 0.36 0.12 0.34 0.02 -0.14 -0.07 -0.02 0.02
desires 0.52 -0.19 -0.03 -0.01 -0.08 0.21 -0.07 -0.04 0.02 0.10
disrespected 0.69 0.00 -0.11 -0.07 -0.03 -0.02 0.16 -0.16 -0.09 0.03
embarrassed 0.53 0.03 -0.30 0.10 0.22 0.34 0.23 -0.06 -0.01 -0.03
emo_recog 0.34 0.50 -0.05 0.09 0.11 -0.07 0.22 0.14 -0.09 0.07
fear 0.55 -0.37 0.11 0.11 -0.08 0.03 0.01 0.17 0.09 0.03
free_will 0.49 0.00 0.32 -0.22 -0.09 0.11 -0.21 -0.18 0.08 0.03
goal 0.35 0.31 -0.03 -0.09 -0.06 0.10 -0.11 0.22 0.02 -0.18
guilt 0.58 0.07 -0.18 0.13 0.25 0.19 -0.07 -0.10 -0.07 -0.08
happy 0.72 0.09 -0.20 0.18 -0.20 -0.06 -0.01 -0.13 0.09 -0.03
hungry 0.38 -0.77 0.22 0.02 0.14 -0.04 0.01 -0.08 0.06 0.05
intentions 0.35 0.40 0.15 -0.24 0.11 0.03 0.02 -0.12 0.09 -0.14
joy 0.70 0.00 -0.26 0.10 -0.18 -0.10 -0.03 -0.05 0.06 -0.01
love 0.60 0.03 -0.20 0.11 0.03 -0.11 0.09 -0.19 -0.05 0.05
morality 0.44 0.37 -0.13 -0.08 0.21 -0.26 -0.05 0.26 -0.18 0.33
nauseated 0.30 -0.43 0.06 0.11 0.27 0.05 0.00 0.07 0.16 0.06
odors 0.15 -0.53 0.38 0.06 0.09 0.12 -0.06 0.16 0.06 0.03
pain 0.45 -0.64 0.21 -0.06 0.07 -0.09 -0.05 -0.04 -0.01 0.10
personality 0.54 0.29 -0.01 -0.12 0.20 0.12 0.01 0.18 -0.01 0.06
pleasure 0.60 0.04 -0.18 0.10 -0.23 -0.17 -0.31 0.04 0.01 -0.04
pride 0.68 0.14 -0.31 0.06 -0.05 -0.02 0.01 -0.04 -0.01 -0.04
reasoning 0.23 0.28 0.36 0.05 -0.16 -0.01 -0.05 0.01 0.05 0.12
recognizing 0.20 0.32 0.13 0.10 0.11 0.00 -0.11 0.21 0.06 0.00
remembering 0.06 0.58 0.17 0.13 -0.05 0.00 0.01 -0.17 0.19 0.28
safe 0.58 -0.08 0.23 0.06 -0.06 -0.06 -0.19 0.16 -0.24 0.00
seeing -0.07 0.13 0.26 -0.03 -0.19 -0.08 0.19 -0.08 0.02 0.27
self_aware 0.27 0.21 0.46 -0.03 -0.10 0.09 0.23 0.00 -0.31 -0.10
self_restraint 0.34 0.19 0.15 -0.56 0.11 -0.33 0.20 0.05 0.17 -0.16
sounds -0.07 0.10 0.40 0.10 -0.18 0.23 0.08 0.23 0.14 -0.08
temperature -0.05 0.34 0.41 0.31 0.34 -0.26 -0.15 -0.23 0.08 -0.15
thoughts 0.57 0.01 0.18 -0.05 -0.11 -0.16 -0.03 0.03 -0.09 0.03
tired 0.39 -0.35 0.07 0.11 0.16 -0.16 0.24 0.06 0.12 -0.07
MR11 MR12 MR13 h2 u2 com
angry -0.04 0.02 -0.16 0.44 0.56 1.7
beliefs 0.06 0.08 0.21 0.50 0.50 2.8
calm 0.10 -0.02 0.10 0.40 0.60 1.8
choices -0.15 0.16 -0.09 0.54 0.46 4.6
communicating 0.04 -0.02 -0.12 0.40 0.60 5.9
computations 0.08 0.10 0.00 0.71 0.29 1.2
conscious -0.04 -0.12 0.01 0.58 0.42 4.2
depressed -0.15 -0.01 0.00 0.63 0.37 1.7
depth 0.17 -0.15 -0.07 0.41 0.59 4.8
desires 0.03 -0.17 0.15 0.42 0.58 2.3
disrespected 0.10 0.09 0.08 0.58 0.42 1.4
embarrassed 0.02 -0.13 -0.05 0.63 0.37 3.7
emo_recog -0.02 0.13 0.05 0.49 0.51 3.1
fear -0.06 -0.25 -0.09 0.58 0.42 2.9
free_will -0.02 -0.03 -0.10 0.51 0.49 3.5
goal -0.25 -0.04 0.14 0.42 0.58 5.4
guilt 0.14 -0.05 -0.03 0.53 0.47 2.4
happy 0.12 0.05 -0.09 0.69 0.31 1.8
hungry 0.00 0.03 0.01 0.81 0.19 1.8
intentions 0.08 0.05 -0.12 0.43 0.57 4.2
joy 0.05 0.11 0.02 0.62 0.38 1.6
love 0.07 0.03 0.14 0.50 0.50 1.9
morality 0.07 0.03 -0.09 0.69 0.31 5.9
nauseated -0.10 0.02 0.08 0.42 0.58 3.6
odors 0.19 0.09 -0.06 0.55 0.45 3.0
pain -0.01 0.06 0.08 0.70 0.30 2.3
personality -0.09 0.00 0.09 0.50 0.50 2.6
pleasure 0.08 -0.09 -0.02 0.60 0.40 2.5
pride -0.03 0.01 -0.15 0.61 0.39 1.7
reasoning -0.06 -0.11 0.22 0.37 0.63 4.8
recognizing 0.04 -0.14 0.05 0.26 0.74 4.7
remembering -0.24 -0.03 -0.08 0.59 0.41 2.8
safe -0.10 0.09 -0.22 0.59 0.41 2.8
seeing 0.20 -0.08 0.02 0.30 0.70 6.0
self_aware -0.09 -0.03 0.01 0.52 0.48 4.2
self_restraint 0.15 -0.19 0.01 0.76 0.24 4.5
sounds 0.25 0.23 0.06 0.47 0.53 5.6
temperature -0.09 0.08 0.04 0.68 0.32 6.4
thoughts -0.03 0.15 0.08 0.44 0.56 1.8
tired -0.11 0.12 0.05 0.45 0.55 4.7
MR1 MR2 MR3 MR4 MR5 MR6 MR7 MR8 MR9 MR10 MR11
SS loadings 8.25 4.13 2.18 1.05 0.96 0.84 0.73 0.66 0.62 0.54 0.52
Proportion Var 0.21 0.10 0.05 0.03 0.02 0.02 0.02 0.02 0.02 0.01 0.01
Cumulative Var 0.21 0.31 0.36 0.39 0.41 0.44 0.45 0.47 0.49 0.50 0.51
Proportion Explained 0.39 0.19 0.10 0.05 0.05 0.04 0.03 0.03 0.03 0.03 0.02
Cumulative Proportion 0.39 0.58 0.68 0.73 0.78 0.82 0.85 0.88 0.91 0.94 0.96
MR12 MR13
SS loadings 0.44 0.40
Proportion Var 0.01 0.01
Cumulative Var 0.52 0.53
Proportion Explained 0.02 0.02
Cumulative Proportion 0.98 1.00
Mean item complexity = 3.4
Test of the hypothesis that 13 factors are sufficient.
The degrees of freedom for the null model are 780 and the objective function was 17.08 with Chi Square of 3157.08
The degrees of freedom for the model are 338 and the objective function was 1.79
The root mean square of the residuals (RMSR) is 0.02
The df corrected root mean square of the residuals is 0.03
The harmonic number of observations is 198 with the empirical chi square 142.71 with prob < 1
The total number of observations was 200 with Likelihood Chi Square = 314.7 with prob < 0.81
Tucker Lewis Index of factoring reliability = 1.024
RMSEA index = 0.016 and the 90 % confidence intervals are 0 0.018
BIC = -1476.13
Fit based upon off diagonal values = 0.99
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.98 0.96 0.91 0.86 0.83 0.83
Multiple R square of scores with factors 0.95 0.93 0.83 0.74 0.69 0.68
Minimum correlation of possible factor scores 0.90 0.86 0.67 0.48 0.38 0.36
MR7 MR8 MR9 MR10 MR11 MR12
Correlation of scores with factors 0.79 0.77 0.77 0.75 0.73 0.71
Multiple R square of scores with factors 0.62 0.60 0.59 0.56 0.53 0.50
Minimum correlation of possible factor scores 0.23 0.19 0.18 0.12 0.06 0.00
MR13
Correlation of scores with factors 0.67
Multiple R square of scores with factors 0.45
Minimum correlation of possible factor scores -0.10
# count factors with eigenvalues > 1 and variance explained > 5%
efa_d2_all_unrotated_nfactors <- efa_d2_all_unrotated_eigenvalues %>%
filter(SS.loadings > 1, Proportion.Explained > 0.05) %>%
count() %>%
as.numeric()
efa_d2_all_unrotated_nfactors
[1] 3
efa_d2_all_rotated_max <- fa(d2_all, 13, rotate = chosenRotType,
cor = chosenCorType, fm = "minres")
convergence not obtained in GPFoblq. 1000 iterations used.
efa_d2_all_rotated <- fa(d2_all, efa_d2_all_unrotated_nfactors, rotate = chosenRotType,
cor = chosenCorType, fm = "minres")
# check that each of these factors is the dominant factor for at least one mental capacity item
efa_d2_all_rotated_loadings <- fa.sort(loadings(efa_d2_all_rotated)[]) %>%
data.frame() %>%
rownames_to_column("capacity") %>%
gather(factor, loading, -capacity) %>%
mutate(loading_abs = abs(loading)) %>%
group_by(capacity) %>%
top_n(1, loading_abs) %>%
ungroup()
efa_d2_all_rotated_loadings
# drop any factors where n < 1
efa_d2_all_rotated_loadings %>%
count(factor) %>%
filter(n > 0)
# set number of factors to extract
nfactors_d2_all <- efa_d2_all_rotated_loadings %>%
count(factor) %>%
filter(n > 0) %>%
nrow()
nfactors_d2_all
[1] 3
# run EFA with rotation with N factors
efa_d2_all_rotatedN <- fa(d2_all, nfactors_d2_all,
rotate = chosenRotType, cor = chosenCorType, fm = "minres")
print(efa_d2_all_rotatedN)
Factor Analysis using method = minres
Call: fa(r = d2_all, nfactors = nfactors_d2_all, rotate = chosenRotType,
fm = "minres", cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 h2 u2 com
angry 0.48 0.26 0.05 0.356 0.64 1.6
beliefs 0.51 -0.12 0.16 0.336 0.66 1.3
calm 0.44 0.17 0.12 0.299 0.70 1.5
choices 0.19 0.13 0.36 0.231 0.77 1.8
communicating 0.01 -0.20 0.26 0.111 0.89 1.9
computations 0.12 -0.76 0.25 0.650 0.35 1.3
conscious 0.00 0.16 0.56 0.331 0.67 1.2
depressed 0.65 0.20 0.02 0.504 0.50 1.2
depth -0.09 -0.04 0.45 0.182 0.82 1.1
desires 0.42 0.27 0.04 0.301 0.70 1.7
disrespected 0.65 0.11 0.08 0.488 0.51 1.1
embarrassed 0.62 -0.02 -0.12 0.346 0.65 1.1
emo_recog 0.38 -0.40 0.22 0.360 0.64 2.6
fear 0.33 0.49 0.12 0.441 0.56 1.9
free_will 0.19 0.21 0.43 0.331 0.67 1.9
goal 0.35 -0.21 0.17 0.212 0.79 2.2
guilt 0.60 -0.01 0.01 0.358 0.64 1.0
happy 0.74 0.00 0.02 0.555 0.44 1.0
hungry 0.06 0.87 0.04 0.786 0.21 1.0
intentions 0.24 -0.24 0.37 0.293 0.71 2.5
joy 0.76 0.05 -0.07 0.555 0.44 1.0
love 0.64 0.03 -0.03 0.403 0.60 1.0
morality 0.47 -0.26 0.13 0.306 0.69 1.8
nauseated 0.15 0.47 -0.02 0.270 0.73 1.2
odors -0.20 0.64 0.22 0.425 0.57 1.4
pain 0.15 0.77 0.10 0.662 0.34 1.1
personality 0.49 -0.15 0.24 0.372 0.63 1.7
pleasure 0.61 0.03 0.00 0.375 0.63 1.0
pride 0.81 -0.11 -0.08 0.594 0.41 1.1
reasoning -0.02 -0.08 0.51 0.265 0.73 1.0
recognizing 0.12 -0.20 0.29 0.154 0.85 2.1
remembering 0.02 -0.44 0.36 0.333 0.67 1.9
safe 0.31 0.27 0.34 0.380 0.62 2.9
seeing -0.21 -0.04 0.27 0.083 0.92 1.9
self_aware -0.05 0.02 0.57 0.303 0.70 1.0
self_restraint 0.21 -0.04 0.26 0.144 0.86 2.0
sounds -0.28 0.03 0.37 0.144 0.86 1.9
temperature -0.23 -0.17 0.43 0.212 0.79 1.9
thoughts 0.35 0.17 0.34 0.364 0.64 2.5
tired 0.23 0.42 0.04 0.266 0.73 1.6
MR1 MR2 MR3
SS loadings 6.84 4.15 3.09
Proportion Var 0.17 0.10 0.08
Cumulative Var 0.17 0.27 0.35
Proportion Explained 0.49 0.29 0.22
Cumulative Proportion 0.49 0.78 1.00
With factor correlations of
MR1 MR2 MR3
MR1 1.00 0.16 0.34
MR2 0.16 1.00 -0.02
MR3 0.34 -0.02 1.00
Mean item complexity = 1.6
Test of the hypothesis that 3 factors are sufficient.
The degrees of freedom for the null model are 780 and the objective function was 17.08 with Chi Square of 3157.08
The degrees of freedom for the model are 663 and the objective function was 4.79
The root mean square of the residuals (RMSR) is 0.05
The df corrected root mean square of the residuals is 0.05
The harmonic number of observations is 198 with the empirical chi square 788.89 with prob < 0.00052
The total number of observations was 200 with Likelihood Chi Square = 874.92 with prob < 5.4e-08
Tucker Lewis Index of factoring reliability = 0.894
RMSEA index = 0.047 and the 90 % confidence intervals are 0.032 0.047
BIC = -2637.86
Fit based upon off diagonal values = 0.95
Measures of factor score adequacy
MR1 MR2 MR3
Correlation of scores with factors 0.96 0.96 0.90
Multiple R square of scores with factors 0.92 0.92 0.81
Minimum correlation of possible factor scores 0.85 0.84 0.62
# get loadings for each factor
efa_d2_all_rotatedN_loadings <- loadings(efa_d2_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "capacity")
data.frame(loadings(fa.sort(efa_d2_all_rotatedN))[]) %>%
rownames_to_column("capacity") %>%
mutate_at(vars(starts_with("M")), funs(round2))
Study information:
# make demographics tables
demoSampleSize("study 3")
# demoDuration("study 3")
demoAge("study 3")
Joining, by = c("character", "min_age", "max_age", "median_age", "mean_age", "sd_age")
Column `character` joining factor and character vector, coercing into character vector
# demoGender("study 3")
# demoRace("study 3")
# # alternative methods of determining how many factors
# fa.parallel(d3_all)
# VSS(d3_all)
# run EFA without rotation with N factors
efa_d3_all_unrotated <- fa(d3_all, 6, rotate = "none",
cor = chosenCorType, fm = "minres")
print(efa_d3_all_unrotated)
Factor Analysis using method = minres
Call: fa(r = d3_all, nfactors = 6, rotate = "none", fm = "minres",
cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 h2 u2 com
angry 0.80 -0.08 0.00 -0.04 -0.36 -0.05 0.78 0.22 1.4
choices 0.56 0.52 0.15 -0.03 -0.03 -0.06 0.61 0.39 2.2
conscious 0.48 0.35 0.09 0.02 0.04 0.04 0.37 0.63 2.0
depressed 0.71 -0.23 0.21 -0.20 -0.15 0.16 0.69 0.31 1.8
depth 0.33 0.45 0.06 -0.17 0.24 0.16 0.43 0.57 3.2
disrespected 0.62 -0.23 0.27 -0.03 -0.01 0.27 0.59 0.41 2.1
embarrassed 0.53 -0.17 0.43 0.06 0.10 0.09 0.52 0.48 2.3
fear 0.83 -0.15 -0.27 0.11 0.10 -0.05 0.80 0.20 1.4
guilt 0.54 -0.33 0.46 0.38 -0.03 -0.07 0.76 0.24 3.6
happy 0.69 -0.18 -0.02 -0.27 -0.05 -0.15 0.60 0.40 1.6
hungry 0.75 -0.01 -0.54 0.10 -0.02 -0.03 0.86 0.14 1.9
love 0.65 -0.25 0.06 0.14 0.27 0.02 0.58 0.42 1.8
nauseated 0.52 0.10 -0.25 0.09 -0.21 0.34 0.50 0.50 2.8
odors 0.64 0.02 -0.42 0.14 -0.04 -0.10 0.61 0.39 1.9
pain 0.75 -0.15 -0.28 -0.08 0.10 -0.04 0.67 0.33 1.4
pride 0.72 -0.26 0.27 -0.23 0.02 -0.28 0.79 0.21 2.2
reasoning 0.39 0.61 0.07 0.06 0.06 -0.09 0.54 0.46 1.9
remembering 0.33 0.58 0.27 0.22 -0.15 -0.11 0.60 0.40 2.7
temperature 0.39 0.52 0.07 -0.14 -0.02 0.02 0.45 0.55 2.1
tired 0.77 0.07 -0.10 0.01 0.18 0.06 0.65 0.35 1.2
MR1 MR2 MR3 MR4 MR5 MR6
SS loadings 7.66 2.04 1.39 0.49 0.43 0.40
Proportion Var 0.38 0.10 0.07 0.02 0.02 0.02
Cumulative Var 0.38 0.49 0.55 0.58 0.60 0.62
Proportion Explained 0.62 0.16 0.11 0.04 0.03 0.03
Cumulative Proportion 0.62 0.78 0.89 0.93 0.97 1.00
Mean item complexity = 2.1
Test of the hypothesis that 6 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 12.17 with Chi Square of 1393.17
The degrees of freedom for the model are 85 and the objective function was 0.93
The root mean square of the residuals (RMSR) is 0.03
The df corrected root mean square of the residuals is 0.04
The harmonic number of observations is 123 with the empirical chi square 32.36 with prob < 1
The total number of observations was 123 with Likelihood Chi Square = 103.04 with prob < 0.089
Tucker Lewis Index of factoring reliability = 0.965
RMSEA index = 0.053 and the 90 % confidence intervals are 0 0.068
BIC = -306
Fit based upon off diagonal values = 1
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.98 0.91 0.92 0.79 0.76 0.72
Multiple R square of scores with factors 0.96 0.83 0.85 0.62 0.57 0.52
Minimum correlation of possible factor scores 0.92 0.66 0.69 0.25 0.14 0.05
# examine eigenvalues and variance explained
efa_d3_all_unrotated_eigenvalues <- print(efa_d3_all_unrotated)$Vaccounted %>%
t() %>%
data.frame()
Factor Analysis using method = minres
Call: fa(r = d3_all, nfactors = 6, rotate = "none", fm = "minres",
cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 h2 u2 com
angry 0.80 -0.08 0.00 -0.04 -0.36 -0.05 0.78 0.22 1.4
choices 0.56 0.52 0.15 -0.03 -0.03 -0.06 0.61 0.39 2.2
conscious 0.48 0.35 0.09 0.02 0.04 0.04 0.37 0.63 2.0
depressed 0.71 -0.23 0.21 -0.20 -0.15 0.16 0.69 0.31 1.8
depth 0.33 0.45 0.06 -0.17 0.24 0.16 0.43 0.57 3.2
disrespected 0.62 -0.23 0.27 -0.03 -0.01 0.27 0.59 0.41 2.1
embarrassed 0.53 -0.17 0.43 0.06 0.10 0.09 0.52 0.48 2.3
fear 0.83 -0.15 -0.27 0.11 0.10 -0.05 0.80 0.20 1.4
guilt 0.54 -0.33 0.46 0.38 -0.03 -0.07 0.76 0.24 3.6
happy 0.69 -0.18 -0.02 -0.27 -0.05 -0.15 0.60 0.40 1.6
hungry 0.75 -0.01 -0.54 0.10 -0.02 -0.03 0.86 0.14 1.9
love 0.65 -0.25 0.06 0.14 0.27 0.02 0.58 0.42 1.8
nauseated 0.52 0.10 -0.25 0.09 -0.21 0.34 0.50 0.50 2.8
odors 0.64 0.02 -0.42 0.14 -0.04 -0.10 0.61 0.39 1.9
pain 0.75 -0.15 -0.28 -0.08 0.10 -0.04 0.67 0.33 1.4
pride 0.72 -0.26 0.27 -0.23 0.02 -0.28 0.79 0.21 2.2
reasoning 0.39 0.61 0.07 0.06 0.06 -0.09 0.54 0.46 1.9
remembering 0.33 0.58 0.27 0.22 -0.15 -0.11 0.60 0.40 2.7
temperature 0.39 0.52 0.07 -0.14 -0.02 0.02 0.45 0.55 2.1
tired 0.77 0.07 -0.10 0.01 0.18 0.06 0.65 0.35 1.2
MR1 MR2 MR3 MR4 MR5 MR6
SS loadings 7.66 2.04 1.39 0.49 0.43 0.40
Proportion Var 0.38 0.10 0.07 0.02 0.02 0.02
Cumulative Var 0.38 0.49 0.55 0.58 0.60 0.62
Proportion Explained 0.62 0.16 0.11 0.04 0.03 0.03
Cumulative Proportion 0.62 0.78 0.89 0.93 0.97 1.00
Mean item complexity = 2.1
Test of the hypothesis that 6 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 12.17 with Chi Square of 1393.17
The degrees of freedom for the model are 85 and the objective function was 0.93
The root mean square of the residuals (RMSR) is 0.03
The df corrected root mean square of the residuals is 0.04
The harmonic number of observations is 123 with the empirical chi square 32.36 with prob < 1
The total number of observations was 123 with Likelihood Chi Square = 103.04 with prob < 0.089
Tucker Lewis Index of factoring reliability = 0.965
RMSEA index = 0.053 and the 90 % confidence intervals are 0 0.068
BIC = -306
Fit based upon off diagonal values = 1
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.98 0.91 0.92 0.79 0.76 0.72
Multiple R square of scores with factors 0.96 0.83 0.85 0.62 0.57 0.52
Minimum correlation of possible factor scores 0.92 0.66 0.69 0.25 0.14 0.05
# count factors with eigenvalues > 1 and variance explained > 5%
efa_d3_all_unrotated_nfactors <- efa_d3_all_unrotated_eigenvalues %>%
filter(SS.loadings > 1, Proportion.Explained > 0.05) %>%
count() %>%
as.numeric()
efa_d3_all_unrotated_nfactors
[1] 3
efa_d3_all_rotated_max <- fa(d3_all, 6, rotate = chosenRotType,
cor = chosenCorType, fm = "minres")
efa_d3_all_rotated <- fa(d3_all, efa_d3_all_unrotated_nfactors, rotate = chosenRotType,
cor = chosenCorType, fm = "minres")
# check that each of these factors is the dominant factor for at least one mental capacity item
efa_d3_all_rotated_loadings <- fa.sort(loadings(efa_d3_all_rotated)[]) %>%
data.frame() %>%
rownames_to_column("capacity") %>%
gather(factor, loading, -capacity) %>%
mutate(loading_abs = abs(loading)) %>%
group_by(capacity) %>%
top_n(1, loading_abs) %>%
ungroup()
efa_d3_all_rotated_loadings
# drop any factors where n < 1
efa_d3_all_rotated_loadings %>%
count(factor) %>%
filter(n > 0)
# set number of factors to extract
nfactors_d3_all <- efa_d3_all_rotated_loadings %>%
count(factor) %>%
filter(n > 0) %>%
nrow()
nfactors_d3_all
[1] 3
# run EFA with rotation with N factors
efa_d3_all_rotatedN <- fa(d3_all, nfactors_d3_all,
rotate = chosenRotType, cor = chosenCorType,
fm = "minres",
n.iter = 5000) # many iter for bootstrapped CIs
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
An ultra-Heywood case was detected. Examine the results carefully A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
An ultra-Heywood case was detected. Examine the results carefully A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.
print(efa_d3_all_rotatedN)
Factor Analysis with confidence intervals using method = fa(r = d3_all, nfactors = nfactors_d3_all, n.iter = 5000, rotate = chosenRotType,
fm = "minres", cor = chosenCorType)
Factor Analysis using method = minres
Call: fa(r = d3_all, nfactors = nfactors_d3_all, n.iter = 5000, rotate = chosenRotType,
fm = "minres", cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR3 MR2 h2 u2 com
angry 0.41 0.43 0.14 0.62 0.38 2.2
choices 0.05 0.09 0.73 0.62 0.38 1.0
conscious 0.09 0.10 0.52 0.37 0.63 1.1
depressed 0.17 0.66 0.03 0.60 0.40 1.1
depth 0.04 -0.04 0.54 0.29 0.71 1.0
disrespected 0.06 0.67 0.02 0.51 0.49 1.0
embarrassed -0.17 0.76 0.10 0.52 0.48 1.1
fear 0.73 0.26 -0.01 0.78 0.22 1.3
guilt -0.11 0.78 -0.04 0.52 0.48 1.0
happy 0.38 0.42 0.01 0.49 0.51 2.0
hungry 0.98 -0.11 0.02 0.87 0.13 1.0
love 0.30 0.51 -0.05 0.48 0.52 1.6
nauseated 0.48 0.00 0.16 0.31 0.69 1.2
odors 0.78 -0.08 0.06 0.58 0.42 1.0
pain 0.69 0.21 -0.03 0.66 0.34 1.2
pride 0.13 0.71 0.02 0.63 0.37 1.1
reasoning 0.04 -0.11 0.74 0.54 0.46 1.0
remembering -0.17 0.05 0.71 0.46 0.54 1.1
temperature 0.05 -0.05 0.65 0.43 0.57 1.0
tired 0.49 0.25 0.25 0.61 0.39 2.1
MR1 MR3 MR2
SS loadings 4.10 3.90 2.88
Proportion Var 0.21 0.19 0.14
Cumulative Var 0.21 0.40 0.54
Proportion Explained 0.38 0.36 0.26
Cumulative Proportion 0.38 0.74 1.00
With factor correlations of
MR1 MR3 MR2
MR1 1.00 0.5 0.36
MR3 0.50 1.0 0.30
MR2 0.36 0.3 1.00
Mean item complexity = 1.3
Test of the hypothesis that 3 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 12.17 with Chi Square of 1393.17
The degrees of freedom for the model are 133 and the objective function was 1.7
The root mean square of the residuals (RMSR) is 0.04
The df corrected root mean square of the residuals is 0.05
The harmonic number of observations is 123 with the empirical chi square 82.37 with prob < 1
The total number of observations was 123 with Likelihood Chi Square = 191.76 with prob < 0.00065
Tucker Lewis Index of factoring reliability = 0.929
RMSEA index = 0.068 and the 90 % confidence intervals are 0.04 0.078
BIC = -448.26
Fit based upon off diagonal values = 0.99
Measures of factor score adequacy
MR1 MR3 MR2
Correlation of scores with factors 0.97 0.94 0.92
Multiple R square of scores with factors 0.94 0.89 0.85
Minimum correlation of possible factor scores 0.89 0.78 0.69
Coefficients and bootstrapped confidence intervals
low MR1 upper low MR3 upper low MR2 upper
angry 0.24 0.41 0.62 0.25 0.43 0.61 0.01 0.14 0.29
choices -0.07 0.05 0.22 -0.06 0.09 0.25 0.57 0.73 0.86
conscious -0.09 0.09 0.30 -0.05 0.10 0.28 0.36 0.52 0.67
depressed 0.02 0.17 0.39 0.46 0.66 0.84 -0.10 0.03 0.17
depth -0.17 0.04 0.27 -0.23 -0.04 0.17 0.34 0.54 0.71
disrespected -0.10 0.06 0.27 0.45 0.67 0.87 -0.10 0.02 0.15
embarrassed -0.30 -0.17 0.02 0.58 0.76 0.88 -0.02 0.10 0.22
fear 0.60 0.73 0.90 0.14 0.26 0.42 -0.10 -0.01 0.10
guilt -0.28 -0.11 0.10 0.61 0.78 0.90 -0.16 -0.04 0.09
happy 0.20 0.38 0.61 0.23 0.42 0.61 -0.15 0.01 0.18
hungry 0.88 0.98 1.03 -0.20 -0.11 0.07 -0.06 0.02 0.14
love 0.12 0.30 0.53 0.32 0.51 0.69 -0.20 -0.05 0.11
nauseated 0.29 0.48 0.67 -0.18 0.00 0.21 -0.01 0.16 0.34
odors 0.63 0.78 0.92 -0.21 -0.08 0.11 -0.06 0.06 0.20
pain 0.53 0.69 0.88 0.08 0.21 0.38 -0.16 -0.03 0.12
pride -0.02 0.13 0.34 0.53 0.71 0.87 -0.10 0.02 0.15
reasoning -0.11 0.04 0.22 -0.25 -0.11 0.04 0.59 0.74 0.87
remembering -0.35 -0.17 0.02 -0.13 0.05 0.22 0.57 0.71 0.84
temperature -0.12 0.05 0.25 -0.20 -0.05 0.10 0.48 0.65 0.81
tired 0.31 0.49 0.71 0.12 0.25 0.41 0.09 0.25 0.42
Interfactor correlations and bootstrapped confidence intervals
lower estimate upper
MR1-MR3 0.280 0.50 0.60
MR1-MR2 0.141 0.36 0.53
MR3-MR2 0.088 0.30 0.45
# get loadings for each factor
efa_d3_all_rotatedN_loadings <- loadings(efa_d3_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "capacity")
data.frame(loadings(fa.sort(efa_d3_all_rotatedN))[]) %>%
rownames_to_column("capacity") %>%
mutate_at(vars(starts_with("M")), funs(round2))
# Cronbach's alpha (subscales)
keys.list <- list(HEART = c("pride", "depressed", "disrespected", "guilt",
"embarrassed", "happy", "love"),
BODY = c("hungry", "odors", "fear", "pain", "tired", "angry", "nauseated"),
MIND = c("reasoning", "choices", "remembering", "temperature",
"conscious", "depth"))
scores <- scoreItems(keys.list, d3_all, min = 0, max = 1) # or just use the keys.lit
# summary(scores)
scores
Call: scoreItems(keys = keys.list, items = d3_all, min = 0, max = 1)
(Unstandardized) Alpha:
HEART BODY MIND
alpha 0.88 0.91 0.82
Standard errors of unstandardized Alpha:
HEART BODY MIND
ASE 0.036 0.032 0.048
Average item correlation:
HEART BODY MIND
average.r 0.5 0.58 0.43
Guttman 6* reliability:
HEART BODY MIND
Lambda.6 0.89 0.93 0.83
Signal/Noise based upon av.r :
HEART BODY MIND
Signal/Noise 7 9.6 4.5
Scale intercorrelations corrected for attenuation
raw correlations below the diagonal, alpha on the diagonal
corrected correlations above the diagonal:
HEART BODY MIND
HEART 0.88 0.74 0.37
BODY 0.66 0.91 0.50
MIND 0.31 0.43 0.82
In order to see the item by scale loadings and frequency counts of the data
print with the short option = FALSE
# omega
omega(d3_all, plot = F)
Omega
Call: omega(m = d3_all, plot = F)
Alpha: 0.92
G.6: 0.94
Omega Hierarchical: 0.64
Omega H asymptotic: 0.68
Omega Total 0.94
Schmid Leiman Factor loadings greater than 0.2
g F1* F2* F3* h2 u2 p2
angry 0.66 0.26 0.33 0.62 0.38 0.70
choices 0.44 0.64 0.62 0.38 0.32
conscious 0.38 0.46 0.37 0.63 0.40
depressed 0.57 0.51 0.60 0.40 0.55
depth 0.26 0.47 0.29 0.71 0.23
disrespected 0.49 0.52 0.51 0.49 0.47
embarrassed 0.40 0.58 0.52 0.48 0.31
fear 0.73 0.46 0.20 0.78 0.22 0.68
guilt 0.40 0.60 0.52 0.48 0.30
happy 0.57 0.24 0.32 0.49 0.51 0.67
hungry 0.70 0.61 0.87 0.13 0.56
love 0.54 0.39 0.48 0.52 0.60
nauseated 0.45 0.30 0.31 0.69 0.65
odors 0.58 0.49 0.58 0.42 0.58
pain 0.66 0.44 0.66 0.34 0.67
pride 0.57 0.55 0.63 0.37 0.51
reasoning 0.31 0.66 0.54 0.46 0.18
remembering 0.23 0.63 0.46 0.54 0.11
temperature 0.31 0.58 0.43 0.57 0.22
tired 0.66 0.30 0.22 0.61 0.39 0.71
With eigenvalues of:
g F1* F2* F3*
5.3 1.4 2.0 2.1
general/max 2.53 max/min = 1.5
mean percent general = 0.47 with sd = 0.2 and cv of 0.42
Explained Common Variance of the general factor = 0.49
The degrees of freedom are 133 and the fit is 1.7
The number of observations was 123 with Chi Square = 191.76 with prob < 0.00065
The root mean square of the residuals is 0.04
The df corrected root mean square of the residuals is 0.05
RMSEA index = 0.068 and the 10 % confidence intervals are 0.04 0.078
BIC = -448.26
Compare this with the adequacy of just a general factor and no group factors
The degrees of freedom for just the general factor are 170 and the fit is 5.12
The number of observations was 123 with Chi Square = 582.57 with prob < 1.3e-46
The root mean square of the residuals is 0.16
The df corrected root mean square of the residuals is 0.17
RMSEA index = 0.148 and the 10 % confidence intervals are 0.129 0.154
BIC = -235.5
Measures of factor score adequacy
g F1* F2* F3*
Correlation of scores with factors 0.83 0.70 0.81 0.86
Multiple R square of scores with factors 0.69 0.49 0.66 0.74
Minimum correlation of factor score estimates 0.38 -0.02 0.32 0.49
Total, General and Subset omega for each subset
g F1* F2* F3*
Omega total for total scores and subscales 0.94 0.89 0.88 0.82
Omega general for total scores and subscales 0.64 0.61 0.49 0.20
Omega group for total scores and subscales 0.22 0.29 0.40 0.63
Study information:
# make demographics tables
demoSampleSize("study 4")
# demoDuration("study 4")
demoAge("study 4")
Joining, by = c("character", "min_age", "max_age", "median_age", "mean_age", "sd_age")
Column `character` joining factor and character vector, coercing into character vector
# demoGender("study 4")
demoRace("study 4")
# # alternative methods of determining how many factors
# fa.parallel(d4_all)
# VSS(d4_all)
# run EFA without rotation with N factors
efa_d4_all_unrotated <- fa(d4_all, 6, rotate = "none",
cor = chosenCorType, fm = "minres")
print(efa_d4_all_unrotated)
Factor Analysis using method = minres
Call: fa(r = d4_all, nfactors = 6, rotate = "none", fm = "minres",
cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 h2 u2 com
angry 0.67 -0.02 -0.20 -0.41 0.13 0.02 0.68 0.3238 2.0
choices 0.53 0.08 0.10 0.14 0.21 0.18 0.40 0.6042 1.9
conscious 0.57 0.56 -0.53 0.05 -0.26 0.04 1.00 0.0015 3.4
depressed 0.61 -0.18 -0.20 -0.06 0.29 0.22 0.58 0.4184 2.2
depth 0.43 0.31 0.07 -0.01 0.09 0.08 0.30 0.6981 2.1
disrespected 0.66 -0.06 -0.24 -0.20 0.15 -0.16 0.58 0.4173 1.8
embarrassed 0.55 -0.04 0.07 0.13 -0.05 -0.36 0.46 0.5369 1.9
fear 0.60 -0.13 0.16 0.10 -0.21 0.09 0.47 0.5347 1.6
guilt 0.50 0.17 0.22 0.02 0.15 -0.03 0.35 0.6478 1.9
happy 0.68 -0.19 -0.13 0.40 0.06 -0.07 0.69 0.3080 1.9
hungry 0.74 -0.20 0.22 -0.19 -0.10 -0.04 0.69 0.3127 1.5
love 0.59 -0.27 -0.12 0.36 -0.05 0.15 0.59 0.4133 2.4
nauseated 0.65 -0.19 0.04 -0.03 0.11 -0.24 0.53 0.4679 1.5
odors 0.62 -0.18 0.17 -0.20 -0.31 0.16 0.61 0.3906 2.3
pain 0.53 0.01 -0.11 -0.10 -0.13 -0.21 0.37 0.6327 1.6
pride 0.66 -0.14 -0.12 0.15 -0.09 0.06 0.50 0.4993 1.3
reasoning 0.51 0.23 0.15 -0.15 -0.03 0.03 0.36 0.6428 1.8
remembering 0.41 0.24 0.38 0.06 -0.04 0.02 0.37 0.6262 2.7
temperature 0.50 0.43 0.19 0.20 0.13 -0.09 0.53 0.4659 2.8
tired 0.72 0.03 0.10 -0.11 0.00 0.12 0.56 0.4423 1.2
MR1 MR2 MR3 MR4 MR5 MR6
SS loadings 7.04 1.04 0.86 0.74 0.49 0.44
Proportion Var 0.35 0.05 0.04 0.04 0.02 0.02
Cumulative Var 0.35 0.40 0.45 0.48 0.51 0.53
Proportion Explained 0.66 0.10 0.08 0.07 0.05 0.04
Cumulative Proportion 0.66 0.76 0.84 0.91 0.96 1.00
Mean item complexity = 2
Test of the hypothesis that 6 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 8.76 with Chi Square of 994.76
The degrees of freedom for the model are 85 and the objective function was 0.89
The root mean square of the residuals (RMSR) is 0.03
The df corrected root mean square of the residuals is 0.05
The harmonic number of observations is 120 with the empirical chi square 50.27 with prob < 1
The total number of observations was 122 with Likelihood Chi Square = 97.45 with prob < 0.17
Tucker Lewis Index of factoring reliability = 0.964
RMSEA index = 0.047 and the 90 % confidence intervals are 0 0.063
BIC = -310.9
Fit based upon off diagonal values = 0.99
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.97 0.90 0.88 0.82 0.77 0.69
Multiple R square of scores with factors 0.95 0.81 0.78 0.67 0.59 0.48
Minimum correlation of possible factor scores 0.89 0.63 0.56 0.34 0.19 -0.05
# examine eigenvalues and variance explained
efa_d4_all_unrotated_eigenvalues <- print(efa_d4_all_unrotated)$Vaccounted %>%
t() %>%
data.frame()
Factor Analysis using method = minres
Call: fa(r = d4_all, nfactors = 6, rotate = "none", fm = "minres",
cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 h2 u2 com
angry 0.67 -0.02 -0.20 -0.41 0.13 0.02 0.68 0.3238 2.0
choices 0.53 0.08 0.10 0.14 0.21 0.18 0.40 0.6042 1.9
conscious 0.57 0.56 -0.53 0.05 -0.26 0.04 1.00 0.0015 3.4
depressed 0.61 -0.18 -0.20 -0.06 0.29 0.22 0.58 0.4184 2.2
depth 0.43 0.31 0.07 -0.01 0.09 0.08 0.30 0.6981 2.1
disrespected 0.66 -0.06 -0.24 -0.20 0.15 -0.16 0.58 0.4173 1.8
embarrassed 0.55 -0.04 0.07 0.13 -0.05 -0.36 0.46 0.5369 1.9
fear 0.60 -0.13 0.16 0.10 -0.21 0.09 0.47 0.5347 1.6
guilt 0.50 0.17 0.22 0.02 0.15 -0.03 0.35 0.6478 1.9
happy 0.68 -0.19 -0.13 0.40 0.06 -0.07 0.69 0.3080 1.9
hungry 0.74 -0.20 0.22 -0.19 -0.10 -0.04 0.69 0.3127 1.5
love 0.59 -0.27 -0.12 0.36 -0.05 0.15 0.59 0.4133 2.4
nauseated 0.65 -0.19 0.04 -0.03 0.11 -0.24 0.53 0.4679 1.5
odors 0.62 -0.18 0.17 -0.20 -0.31 0.16 0.61 0.3906 2.3
pain 0.53 0.01 -0.11 -0.10 -0.13 -0.21 0.37 0.6327 1.6
pride 0.66 -0.14 -0.12 0.15 -0.09 0.06 0.50 0.4993 1.3
reasoning 0.51 0.23 0.15 -0.15 -0.03 0.03 0.36 0.6428 1.8
remembering 0.41 0.24 0.38 0.06 -0.04 0.02 0.37 0.6262 2.7
temperature 0.50 0.43 0.19 0.20 0.13 -0.09 0.53 0.4659 2.8
tired 0.72 0.03 0.10 -0.11 0.00 0.12 0.56 0.4423 1.2
MR1 MR2 MR3 MR4 MR5 MR6
SS loadings 7.04 1.04 0.86 0.74 0.49 0.44
Proportion Var 0.35 0.05 0.04 0.04 0.02 0.02
Cumulative Var 0.35 0.40 0.45 0.48 0.51 0.53
Proportion Explained 0.66 0.10 0.08 0.07 0.05 0.04
Cumulative Proportion 0.66 0.76 0.84 0.91 0.96 1.00
Mean item complexity = 2
Test of the hypothesis that 6 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 8.76 with Chi Square of 994.76
The degrees of freedom for the model are 85 and the objective function was 0.89
The root mean square of the residuals (RMSR) is 0.03
The df corrected root mean square of the residuals is 0.05
The harmonic number of observations is 120 with the empirical chi square 50.27 with prob < 1
The total number of observations was 122 with Likelihood Chi Square = 97.45 with prob < 0.17
Tucker Lewis Index of factoring reliability = 0.964
RMSEA index = 0.047 and the 90 % confidence intervals are 0 0.063
BIC = -310.9
Fit based upon off diagonal values = 0.99
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.97 0.90 0.88 0.82 0.77 0.69
Multiple R square of scores with factors 0.95 0.81 0.78 0.67 0.59 0.48
Minimum correlation of possible factor scores 0.89 0.63 0.56 0.34 0.19 -0.05
# count factors with eigenvalues > 1 and variance explained > 5%
efa_d4_all_unrotated_nfactors <- efa_d4_all_unrotated_eigenvalues %>%
filter(SS.loadings > 1, Proportion.Explained > 0.05) %>%
count() %>%
as.numeric()
efa_d4_all_unrotated_nfactors
[1] 2
efa_d4_all_rotated_max <- fa(d4_all, 6, rotate = chosenRotType,
cor = chosenCorType, fm = "minres")
The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
efa_d4_all_rotated <- fa(d4_all, efa_d4_all_unrotated_nfactors, rotate = chosenRotType,
cor = chosenCorType, fm = "minres")
# check that each of these factors is the dominant factor for at least one mental capacity item
efa_d4_all_rotated_loadings <- fa.sort(loadings(efa_d4_all_rotated)[]) %>%
data.frame() %>%
rownames_to_column("capacity") %>%
gather(factor, loading, -capacity) %>%
mutate(loading_abs = abs(loading)) %>%
group_by(capacity) %>%
top_n(1, loading_abs) %>%
ungroup()
efa_d4_all_rotated_loadings
# drop any factors where n < 1
efa_d4_all_rotated_loadings %>%
count(factor) %>%
filter(n > 0)
# set number of factors to extract
nfactors_d4_all <- efa_d4_all_rotated_loadings %>%
count(factor) %>%
filter(n > 0) %>%
nrow()
nfactors_d4_all
[1] 2
# run EFA with rotation with N factors
efa_d4_all_rotatedN <- fa(d4_all, nfactors_d4_all,
rotate = chosenRotType, cor = chosenCorType,
fm = "minres",
n.iter = 5000) # many iter for bootstrapped CIs
The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
An ultra-Heywood case was detected. Examine the results carefully A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
An ultra-Heywood case was detected. Examine the results carefullyconvergence not obtained in GPFoblq. 1000 iterations used. A loading greater than abs(1) was detected. Examine the loadings carefully.The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
The estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
print(efa_d4_all_rotatedN)
Factor Analysis with confidence intervals using method = fa(r = d4_all, nfactors = nfactors_d4_all, n.iter = 5000, rotate = chosenRotType,
fm = "minres", cor = chosenCorType)
Factor Analysis using method = minres
Call: fa(r = d4_all, nfactors = nfactors_d4_all, n.iter = 5000, rotate = chosenRotType,
fm = "minres", cor = chosenCorType)
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 h2 u2 com
angry 0.61 0.08 0.44 0.56 1.0
choices 0.31 0.29 0.29 0.71 2.0
conscious 0.28 0.32 0.29 0.71 2.0
depressed 0.67 -0.07 0.40 0.60 1.0
depth 0.03 0.52 0.30 0.70 1.0
disrespected 0.66 0.01 0.45 0.55 1.0
embarrassed 0.45 0.14 0.30 0.70 1.2
fear 0.54 0.09 0.36 0.64 1.1
guilt 0.16 0.46 0.32 0.68 1.2
happy 0.73 -0.05 0.49 0.51 1.0
hungry 0.68 0.10 0.55 0.45 1.0
love 0.71 -0.15 0.40 0.60 1.1
nauseated 0.66 0.01 0.45 0.55 1.0
odors 0.57 0.06 0.37 0.63 1.0
pain 0.47 0.09 0.28 0.72 1.1
pride 0.72 -0.05 0.47 0.53 1.0
reasoning 0.16 0.47 0.34 0.66 1.2
remembering -0.03 0.57 0.31 0.69 1.0
temperature -0.03 0.70 0.46 0.54 1.0
tired 0.51 0.30 0.53 0.47 1.6
MR1 MR2
SS loadings 5.58 2.22
Proportion Var 0.28 0.11
Cumulative Var 0.28 0.39
Proportion Explained 0.72 0.28
Cumulative Proportion 0.72 1.00
With factor correlations of
MR1 MR2
MR1 1.0 0.6
MR2 0.6 1.0
Mean item complexity = 1.2
Test of the hypothesis that 2 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 8.76 with Chi Square of 994.76
The degrees of freedom for the model are 151 and the objective function was 2.16
The root mean square of the residuals (RMSR) is 0.06
The df corrected root mean square of the residuals is 0.07
The harmonic number of observations is 120 with the empirical chi square 177.45 with prob < 0.07
The total number of observations was 122 with Likelihood Chi Square = 242.36 with prob < 3.4e-06
Tucker Lewis Index of factoring reliability = 0.855
RMSEA index = 0.078 and the 90 % confidence intervals are 0.054 0.087
BIC = -483.05
Fit based upon off diagonal values = 0.97
Measures of factor score adequacy
MR1 MR2
Correlation of scores with factors 0.95 0.88
Multiple R square of scores with factors 0.91 0.78
Minimum correlation of possible factor scores 0.82 0.56
Coefficients and bootstrapped confidence intervals
low MR1 upper low MR2 upper
angry -35.40 0.61 38.04 -35.78 0.08 37.72
choices -28.87 0.31 30.83 -28.90 0.29 30.78
conscious -29.76 0.28 31.64 -29.75 0.32 31.67
depressed -36.64 0.67 39.24 -37.20 -0.07 38.78
depth -19.39 0.03 20.63 -19.06 0.52 20.96
disrespected -39.83 0.66 42.61 -40.32 0.01 42.19
embarrassed -31.47 0.45 33.61 -31.71 0.14 33.42
fear -39.53 0.54 42.05 -39.85 0.09 41.75
guilt -28.74 0.16 30.45 -28.54 0.46 30.60
happy -39.26 0.73 42.18 -39.87 -0.05 41.67
hungry -38.91 0.68 41.89 -39.32 0.10 41.52
love -33.23 0.71 35.79 -33.88 -0.15 35.23
nauseated -39.30 0.66 42.05 -39.80 0.01 41.63
odors -36.42 0.57 38.94 -36.76 0.06 38.62
pain -31.97 0.47 34.13 -32.27 0.09 33.89
pride -38.68 0.72 41.52 -39.24 -0.05 41.01
reasoning -24.82 0.16 26.48 -24.59 0.47 26.65
remembering -18.95 -0.03 20.10 -18.52 0.57 20.46
temperature -24.98 -0.03 26.42 -24.51 0.70 26.82
tired -42.93 0.51 45.75 -43.10 0.30 45.63
Interfactor correlations and bootstrapped confidence intervals
lower estimate upper
MR1-MR2 0.33 0.6 0.66
# get loadings for each factor
efa_d4_all_rotatedN_loadings <- loadings(efa_d4_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "capacity")
data.frame(loadings(fa.sort(efa_d4_all_rotatedN))[]) %>%
rownames_to_column("capacity") %>%
mutate_at(vars(starts_with("M")), funs(round2))
# manually set 3 factors
order_s1_manual <- loadings(fa.sort(fa(d1_all, nfactors = 3,
rotate = chosenRotType, cor = chosenCorType)))[] %>%
data.frame() %>%
rownames_to_column(var = "capacity") %>%
rownames_to_column(var = "order1_manual") %>%
rename(s1_heart = MR2, s1_body = MR1, s1_mind = MR3)
order_s1 <- loadings(fa.sort(efa_d1_all_rotatedN))[] %>%
data.frame() %>%
rownames_to_column(var = "capacity") %>%
rownames_to_column(var = "order1") %>%
rename(s1_heart = MR2, s1_body = MR1, s1_mind = MR3)
order_s2 <- loadings(fa.sort(efa_d2_all_rotatedN))[] %>%
data.frame() %>%
rownames_to_column(var = "capacity") %>%
rename(s2_body = MR2, s2_heart = MR1, s2_mind = MR3)
order_s3 <- loadings(fa.sort(efa_d3_all_rotatedN))[] %>%
data.frame() %>%
rownames_to_column(var = "capacity") %>%
rename(s3_body = MR1, s3_heart = MR2, s3_mind = MR3)
order_s4 <- loadings(fa.sort(efa_d4_all_rotatedN))[] %>%
data.frame() %>%
rownames_to_column(var = "capacity") %>%
rename(s4_body = MR1,
# s4_heart = MR3,
s4_mind = MR2)
# manually set 3 factors
order_s4_manual <- loadings(fa.sort(fa(d1_all, nfactors = 3,
rotate = chosenRotType, cor = chosenCorType)))[] %>%
data.frame() %>%
rownames_to_column(var = "capacity") %>%
rownames_to_column(var = "order1_manual") %>%
rename(s4_heart = MR2, s4_body = MR1, s4_mind = MR3)
bigTable <- order_s1_manual %>% # could substitute order_s1
full_join(order_s2) %>%
full_join(order_s3) %>%
full_join(order_s4_manual) %>% # could substitute order_s4
mutate_at(vars(starts_with("s")), funs(round2)) %>%
select(order1_manual, # could subistitute order_s1
capacity, ends_with("heart"), ends_with("body"), ends_with("mind"))
Joining, by = "capacity"
Joining, by = "capacity"
Joining, by = c("order1_manual", "capacity")
bigTable
Factor loadings for the 40 mental capacities on the three rotated factors in Study 1. Items are colored by their dominant factor loading: Items that loaded most strongly on the body factor (bodily states and will) are in red; items that loaded most strongly on the heart factor (social-emotional experiences and morality) are in blue; and items that loaded most strongly on the mind factor (perceptual-cognitive abilities and goal pursuit) are in green.
# set up labels for plot (shortened version of mental capacity items)
wording_s1 <- loadings(efa_d1_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
select(item) %>%
mutate(wording = factor(
recode(item,
happy = "feel happy",
depressed = "feel sad",
fear = "feel scared",
angry = "get angry",
calm = "feel calm",
sounds = "hear sounds",
seeing = "see things",
temperature = "sense temperatures",
odors = "smell things",
depth = "sense whether something is close by or far away",
computations = "do math",
thoughts = "have thoughts",
reasoning = "figure out how to do things",
remembering = "remember things",
beliefs = "have beliefs, like when you think something is true",
hungry = "get hungry",
tired = "feel tired",
pain = "feel pain",
nauseated = "feel sick, like when you feel like you might throw up",
safe = "feel safe",
love = "feel love",
recognizing = "recognize somebody else",
communicating = "communicate with somebody else",
guilt = "feel guilty",
disrespected = "get hurt feelings",
free_will = "decide what to do",
choices = "make choices",
self_restraint = "have self-control, like when you stop yourself from doing something you shouldn't do",
intentions = "make plans",
goal = "have goals, like when you're working hard to do something or make something happen",
conscious = "be aware of things",
self_aware = "be aware of itself",
desires = "have desires, like when you really want something",
embarrassed = "feel embarrassed",
emo_recog = "understand how somebody else is feeling",
joy = "feel joy",
morality = "know what's nice and what's mean",
personality = "have a personality, like when someone is shy and somebody else is silly",
pleasure = "feel pleasure, like when something feels really good",
pride = "feel proud"))) %>%
mutate(short = factor(
recode(item,
happy = "happy",
depressed = "sad",
fear = "scared",
angry = "angry",
calm = "calm",
sounds = "hear",
seeing = "see",
temperature = "temperatures",
odors = "smell",
depth = "depth",
computations = "math",
thoughts = "thoughts",
reasoning = "figure out",
remembering = "remember",
beliefs = "beliefs",
hungry = "hungry",
tired = "tired",
pain = "pain",
nauseated = "sick",
safe = "safe",
love = "love",
recognizing = "recognize",
communicating = "communicate",
guilt = "guilty",
disrespected = "hurt feelings",
free_will = "decide",
choices = "choices",
self_restraint = "self-control",
intentions = "plans",
goal = "goals",
conscious = "aware",
self_aware = "self-aware",
desires = "desires",
embarrassed = "embarrassed",
emo_recog = "empathy",
joy = "joy",
morality = "morality",
personality = "personality",
pleasure = "pleasure",
pride = "pride")))
# make dataframe for plotting
scatter_plotting <- loadings(efa_d1_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
rename(BODY = MR1,
HEART = MR2,
MIND = MR3) %>%
full_join(wording_s1) %>%
mutate(dominant = factor(
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(BODY), "BODY",
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(HEART), "HEART",
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(MIND), "MIND",
NA)))),
size = ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(BODY), abs(BODY),
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(HEART), abs(HEART),
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(MIND), abs(MIND),
NA))),
color = ifelse(dominant == "BODY", "#E41A1C",
ifelse(dominant == "HEART", "#377EB8",
ifelse(dominant == "MIND", "#4DAF4A",
NA))))
Joining, by = "item"
# plot!
figS1 <- plot_ly(scatter_plotting, x = ~HEART, y = ~BODY, z = ~MIND,
type = "scatter3d",
color = ~dominant, colors = c("#377EB8", "#4DAF4A", "#E41A1C"),
marker = list(size = 4),
text = ~short,
textfont = list(size = 15),
mode = "text+markers",
showlegend = TRUE)
figS1
# set up labels for plot (shortened version of mental capacity items)
wording_s2 <- loadings(efa_d2_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
select(item) %>%
mutate(wording = factor(
recode(item,
happy = "feel happy",
depressed = "feel sad",
fear = "feel scared",
angry = "get angry",
calm = "feel calm",
sounds = "hear sounds",
seeing = "see things",
temperature = "sense temperatures",
odors = "smell things",
depth = "sense whether something is close by or far away",
computations = "do math",
thoughts = "have thoughts",
reasoning = "figure out how to do things",
remembering = "remember things",
beliefs = "have beliefs, like when you think something is true",
hungry = "get hungry",
tired = "feel tired",
pain = "feel pain",
nauseated = "feel sick, like when you feel like you might throw up",
safe = "feel safe",
love = "feel love",
recognizing = "recognize somebody else",
communicating = "communicate with somebody else",
guilt = "feel guilty",
disrespected = "get hurt feelings",
free_will = "decide what to do",
choices = "make choices",
self_restraint = "have self-control, like when you stop yourself from doing something you shouldn't do",
intentions = "make plans",
goal = "have goals, like when you're working hard to do something or make something happen",
conscious = "be aware of things",
self_aware = "be aware of itself",
desires = "have desires, like when you really want something",
embarrassed = "feel embarrassed",
emo_recog = "understand how somebody else is feeling",
joy = "feel joy",
morality = "know what's nice and what's mean",
personality = "have a personality, like when someone is shy and somebody else is silly",
pleasure = "feel pleasure, like when something feels really good",
pride = "feel proud"))) %>%
mutate(short = factor(
recode(item,
happy = "happy",
depressed = "sad",
fear = "scared",
angry = "angry",
calm = "calm",
sounds = "hear",
seeing = "see",
temperature = "temperatures",
odors = "smell",
depth = "depth",
computations = "math",
thoughts = "thoughts",
reasoning = "figure out",
remembering = "remember",
beliefs = "beliefs",
hungry = "hungry",
tired = "tired",
pain = "pain",
nauseated = "sick",
safe = "safe",
love = "love",
recognizing = "recognize",
communicating = "communicate",
guilt = "guilty",
disrespected = "hurt feelings",
free_will = "decide",
choices = "choices",
self_restraint = "self-control",
intentions = "plans",
goal = "goals",
conscious = "aware",
self_aware = "self-aware",
desires = "desires",
embarrassed = "embarrassed",
emo_recog = "empathy",
joy = "joy",
morality = "morality",
personality = "personality",
pleasure = "pleasure",
pride = "pride")))
# make dataframe for plotting
scatter_plotting <- loadings(efa_d2_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
rename(BODY = MR1,
HEART = MR2,
MIND = MR3) %>%
full_join(wording_s2) %>%
mutate(dominant = factor(
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(BODY), "BODY",
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(HEART), "HEART",
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(MIND), "MIND",
NA)))),
size = ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(BODY), abs(BODY),
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(HEART), abs(HEART),
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(MIND), abs(MIND),
NA))),
color = ifelse(dominant == "BODY", "#E41A1C",
ifelse(dominant == "HEART", "#4DAF4A",
ifelse(dominant == "MIND", "#E41A1C",
NA))))
Joining, by = "item"
# plot!
figS2 <- plot_ly(scatter_plotting, x = ~HEART, y = ~BODY, z = ~MIND,
type = "scatter3d",
color = ~dominant, colors = c("#377EB8", "#4DAF4A", "#E41A1C"),
marker = list(size = 4),
text = ~short,
textfont = list(size = 15),
mode = "text+markers",
showlegend = TRUE)
figS2
# set up labels for plot (shortened version of mental capacity items)
wording_s3 <- loadings(efa_d3_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
select(item) %>%
mutate(wording = factor(
recode(item,
happy = "feel happy",
depressed = "feel sad",
fear = "feel scared",
angry = "get angry",
calm = "feel calm",
sounds = "hear sounds",
seeing = "see things",
temperature = "sense temperatures",
odors = "smell things",
# depth = "sense whether something is close by or far away",
depth = "sense... far away",
computations = "do math",
thoughts = "have thoughts",
reasoning = "figure out how to do things",
remembering = "remember things",
# beliefs = "have beliefs, like when you think something is true",
beliefs = "have beliefs...",
hungry = "get hungry",
tired = "feel tired",
pain = "feel pain",
# nauseated = "feel sick, like when you feel like you might throw up",
nauseated = "feel sick...",
safe = "feel safe",
love = "feel love",
recognizing = "recognize somebody else",
communicating = "communicate with somebody else",
guilt = "feel guilty",
disrespected = "get hurt feelings",
free_will = "decide what to do",
choices = "make choices",
# self_restraint = "have self-control, like when you stop yourself from doing something you shouldn't do",
self_restraint = "have self-control...",
intentions = "make plans",
# goal = "have goals, like when you're working hard to do something or make something happen",
goal = "have goals...",
conscious = "be aware of things",
self_aware = "be aware of itself",
# desires = "have desires, like when you really want something",
desires = "have desires...",
embarrassed = "feel embarrassed",
emo_recog = "understand how somebody else is feeling",
joy = "feel joy",
morality = "know what's nice and what's mean",
# personality = "have a personality, like when someone is shy and somebody else is silly",
personality = "have a personality...",
# pleasure = "feel pleasure, like when something feels really good",
pleasure = "feel pleasure...",
pride = "feel proud"))) %>%
mutate(short = factor(
recode(item,
happy = "happy",
depressed = "sad",
fear = "scared",
angry = "angry",
calm = "calm",
sounds = "hear",
seeing = "see",
temperature = "temperatures",
odors = "smell",
depth = "depth",
computations = "math",
thoughts = "thoughts",
reasoning = "figure out",
remembering = "remember",
beliefs = "beliefs",
hungry = "hungry",
tired = "tired",
pain = "pain",
nauseated = "sick",
safe = "safe",
love = "love",
recognizing = "recognize",
communicating = "communicate",
guilt = "guilty",
disrespected = "hurt feelings",
free_will = "decide",
choices = "choices",
self_restraint = "self-control",
intentions = "plans",
goal = "goals",
conscious = "aware",
self_aware = "self-aware",
desires = "desires",
embarrassed = "embarrassed",
emo_recog = "empathy",
joy = "joy",
morality = "morality",
personality = "personality",
pleasure = "pleasure",
pride = "pride")))
# make dataframe for plotting
scatter_plotting <- loadings(efa_d3_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
rename(BODY = MR1,
HEART = MR2,
MIND = MR3) %>%
full_join(wording_s3) %>%
mutate(dominant = factor(
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(BODY), "BODY",
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(HEART), "HEART",
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(MIND), "MIND",
NA)))),
size = ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(BODY), abs(BODY),
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(HEART), abs(HEART),
ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(MIND), abs(MIND),
NA))),
color = ifelse(dominant == "BODY", "#E41A1C",
ifelse(dominant == "HEART", "#4DAF4A",
ifelse(dominant == "MIND", "#E41A1C",
NA))))
Joining, by = "item"
# plot!
figs3 <- plot_ly(scatter_plotting, x = ~HEART, y = ~BODY, z = ~MIND,
type = "scatter3d",
color = ~dominant, colors = c("#377EB8", "#4DAF4A", "#E41A1C"),
marker = list(size = 4),
text = ~short,
textfont = list(size = 15),
mode = "text+markers",
showlegend = TRUE)
figs3
# set up labels for plot (shortened version of mental capacity items)
wording_s4 <- loadings(efa_d4_all_rotatedN)[] %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
select(item) %>%
mutate(wording = factor(
recode(item,
happy = "feel happy",
depressed = "feel sad",
fear = "feel scared",
angry = "get angry",
calm = "feel calm",
sounds = "hear sounds",
seeing = "see things",
temperature = "sense temperatures",
odors = "smell things",
# depth = "sense whether something is close by or far away",
depth = "sense... far away",
computations = "do math",
thoughts = "have thoughts",
reasoning = "figure out how to do things",
remembering = "remember things",
# beliefs = "have beliefs, like when you think something is true",
beliefs = "have beliefs...",
hungry = "get hungry",
tired = "feel tired",
pain = "feel pain",
# nauseated = "feel sick, like when you feel like you might throw up",
nauseated = "feel sick...",
safe = "feel safe",
love = "feel love",
recognizing = "recognize somebody else",
communicating = "communicate with somebody else",
guilt = "feel guilty",
disrespected = "get hurt feelings",
free_will = "decide what to do",
choices = "make choices",
# self_restraint = "have self-control, like when you stop yourself from doing something you shouldn't do",
self_restraint = "have self-control...",
intentions = "make plans",
# goal = "have goals, like when you're working hard to do something or make something happen",
goal = "have goals...",
conscious = "be aware of things",
self_aware = "be aware of itself",
# desires = "have desires, like when you really want something",
desires = "have desires...",
embarrassed = "feel embarrassed",
emo_recog = "understand how somebody else is feeling",
joy = "feel joy",
morality = "know what's nice and what's mean",
# personality = "have a personality, like when someone is shy and somebody else is silly",
personality = "have a personality...",
# pleasure = "feel pleasure, like when something feels really good",
pleasure = "feel pleasure...",
pride = "feel proud"))) %>%
mutate(short = factor(
recode(item,
happy = "happy",
depressed = "sad",
fear = "scared",
angry = "angry",
calm = "calm",
sounds = "hear",
seeing = "see",
temperature = "temperatures",
odors = "smell",
depth = "depth",
computations = "math",
thoughts = "thoughts",
reasoning = "figure out",
remembering = "remember",
beliefs = "beliefs",
hungry = "hungry",
tired = "tired",
pain = "pain",
nauseated = "sick",
safe = "safe",
love = "love",
recognizing = "recognize",
communicating = "communicate",
guilt = "guilty",
disrespected = "hurt feelings",
free_will = "decide",
choices = "choices",
self_restraint = "self-control",
intentions = "plans",
goal = "goals",
conscious = "aware",
self_aware = "self-aware",
desires = "desires",
embarrassed = "embarrassed",
emo_recog = "empathy",
joy = "joy",
morality = "morality",
personality = "personality",
pleasure = "pleasure",
pride = "pride")))
# # make dataframe for plotting
# scatter_plotting <- loadings(efa_d4_all_rotatedN)[] %>%
# data.frame() %>%
# rownames_to_column(var = "item") %>%
# rename(BODY = MR1,
# HEART = MR2,
# MIND = MR3) %>%
# full_join(wording_s4) %>%
# mutate(dominant = factor(
# ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(BODY), "BODY",
# ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(HEART), "HEART",
# ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(MIND), "MIND",
# NA)))),
# size = ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(BODY), abs(BODY),
# ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(HEART), abs(HEART),
# ifelse(pmax(abs(BODY), abs(HEART), abs(MIND)) == abs(MIND), abs(MIND),
# NA))),
# color = ifelse(dominant == "BODY", "#E41A1C",
# ifelse(dominant == "HEART", "#4DAF4A",
# ifelse(dominant == "MIND", "#E41A1C",
# NA))))
#
# # plot!
# figs4 <- plot_ly(scatter_plotting, x = ~HEART, y = ~BODY, z = ~MIND,
# type = "scatter3d",
# color = ~dominant, colors = c("#377EB8", "#4DAF4A", "#E41A1C"),
# marker = list(size = 4),
# text = ~short,
# textfont = list(size = 15),
# mode = "text+markers",
# showlegend = TRUE)
#
# figs4
NOTE: set to 3 factors manually, for now.
factors_s1 <- fa.sort(fa(d1_all, nfactors = 3, cor = chosenCorType, rotate = chosenRotType)$loadings[]) %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
full_join(wording_s1) %>%
select(wording, MR1, MR2, MR3) %>%
rename(capacity = wording, Factor1 = MR1, Factor2 = MR2, Factor3 = MR3) %>%
rownames_to_column(var = "order") %>%
mutate(order = as.numeric(order))
Joining, by = "item"
factors_s1_long <- factors_s1 %>%
gather(factor, loading, -capacity, -order) %>%
mutate(factor = factor(gsub("Factor", "F", factor))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# levels = c("F1", "F3", "F2"))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# levels = c("F2", "F1", "F3"))) %>%
arrange(order, factor)
factors_s1_blank1 <- factors_s1_long %>%
mutate(loading = rep(100, length(factors_s1_long$loading)))
# factors_s1_blank2 <- factors_s1_long %>%
# mutate(loading = ifelse(factor == "F1", loading, rep(100, length(factors_s1_long$loading)*2/3)))
factors_s1_blank2 <- factors_s1_long %>%
mutate(loading = ifelse(factor == "F2", loading, rep(100, length(factors_s1_long$loading)*2/3)))
factors_s1_blank3 <- factors_s1_long %>%
mutate(loading = ifelse(factor != "F3", loading, rep(100, length(factors_s1_long$loading)*1/3)))
# ggplot(factors_s1_blank1, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s1_blank2, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s1_blank3, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
ggplot(factors_s1_long, aes(x = factor,
y = reorder(capacity, desc(order)), fill = loading)) +
geom_tile(color = "black") +
geom_text(aes(label = format(round(loading, 2), nsmall = 2)), size = 6) +
scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
guide = guide_colorbar(title = element_blank(),
barheight = 20)) +
scale_x_discrete(position = "top") +
# geom_rect(aes(xmin = 0.51, xmax = 1.49, ymin = 14.55, ymax = 20.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 1.51, xmax = 2.49, ymin = 6.55, ymax = 14.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 2.51, xmax = 3.49, ymin = 0.55, ymax = 6.45),
# alpha = 0, color = "black", size = .5) +
# theme_bw() +
theme_minimal() +
theme(text = element_text(size = 24),
axis.text.x = element_text(size = 28),
axis.title = element_blank(),
panel.grid = element_blank()) # 1000 by 1000
factors_s2 <- fa.sort(fa(d2_all, nfactors = 3, cor = chosenCorType, rotate = chosenRotType)$loadings[]) %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
full_join(wording_s2) %>%
select(wording, MR1, MR2, MR3) %>%
rename(capacity = wording, Factor1 = MR1, Factor2 = MR2, Factor3 = MR3) %>%
rownames_to_column(var = "order") %>%
mutate(order = as.numeric(order))
Joining, by = "item"
factors_s2_long <- factors_s2 %>%
gather(factor, loading, -capacity, -order) %>%
mutate(factor = factor(gsub("Factor", "F", factor))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# levels = c("F1", "F3", "F2"))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# levels = c("F2", "F1", "F3"))) %>%
arrange(order, factor)
factors_s2_blank1 <- factors_s2_long %>%
mutate(loading = rep(100, length(factors_s2_long$loading)))
factors_s2_blank2 <- factors_s2_long %>%
mutate(loading = ifelse(factor == "F1", loading, rep(100, length(factors_s2_long$loading)*2/3)))
# factors_s2_blank2 <- factors_s2_long %>%
# mutate(loading = ifelse(factor == "F2", loading, rep(100, length(factors_s2_long$loading)*2/3)))
factors_s2_blank3 <- factors_s2_long %>%
mutate(loading = ifelse(factor != "F3", loading, rep(100, length(factors_s2_long$loading)*1/3)))
# ggplot(factors_s2_blank1, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s2_blank2, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s2_blank3, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
ggplot(factors_s2_long, aes(x = factor,
y = reorder(capacity, desc(order)), fill = loading)) +
geom_tile(color = "black") +
geom_text(aes(label = format(round(loading, 2), nsmall = 2)), size = 6) +
scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
guide = guide_colorbar(title = element_blank(),
barheight = 20)) +
scale_x_discrete(position = "top") +
# geom_rect(aes(xmin = 0.51, xmax = 1.49, ymin = 14.55, ymax = 20.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 1.51, xmax = 2.49, ymin = 6.55, ymax = 14.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 2.51, xmax = 3.49, ymin = 0.55, ymax = 6.45),
# alpha = 0, color = "black", size = .5) +
# theme_bw() +
theme_minimal() +
theme(text = element_text(size = 24),
axis.text.x = element_text(size = 28),
axis.title = element_blank(),
panel.grid = element_blank()) # 1000 by 1000
factors_s3 <- fa.sort(fa(d3_all, nfactors = 3, cor = chosenCorType, rotate = chosenRotType)$loadings[]) %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
left_join(char_plotting_wordings, by = c("item" = "capacity")) %>%
select(wording, MR1, MR2, MR3) %>%
rename(capacity = wording, Factor1 = MR1, Factor2 = MR2, Factor3 = MR3) %>%
rownames_to_column(var = "order") %>%
mutate(order = as.numeric(order))
factors_s3_long <- factors_s3 %>%
gather(factor, loading, -capacity, -order) %>%
mutate(factor = factor(gsub("Factor", "F", factor))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# # levels = c("F1", "F3", "F2"))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# levels = c("F2", "F1", "F3"))) %>%
arrange(order, factor)
factors_s3_blank1 <- factors_s3_long %>%
mutate(loading = rep(100, length(factors_s3_long$loading)))
# factors_s3_blank2 <- factors_s3_long %>%
# mutate(loading = ifelse(factor == "F1", loading, rep(100, length(factors_s3_long$loading)*2/3)))
factors_s3_blank2 <- factors_s3_long %>%
mutate(loading = ifelse(factor == "F2", loading, rep(100, length(factors_s3_long$loading)*2/3)))
factors_s3_blank3 <- factors_s3_long %>%
mutate(loading = ifelse(factor != "F3", loading, rep(100, length(factors_s3_long$loading)*1/3)))
# ggplot(factors_s3_blank1, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s3_blank2, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s3_blank3, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
ggplot(factors_s3_long, aes(x = factor(factor, labels = c("Body", "Mind", "Heart")),
y = reorder(capacity, desc(order)), fill = loading)) +
geom_tile(color = "black") +
geom_text(aes(label = format(round(loading, 2), nsmall = 2)), size = 6) +
scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
guide = guide_colorbar(title = element_blank(),
barheight = 20)) +
scale_x_discrete(position = "top") +
# geom_rect(aes(xmin = 0.51, xmax = 1.49, ymin = 14.55, ymax = 20.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 1.51, xmax = 2.49, ymin = 6.55, ymax = 14.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 2.51, xmax = 3.49, ymin = 0.55, ymax = 6.45),
# alpha = 0, color = "black", size = .5) +
# theme_bw() +
theme_minimal() +
labs(x = "Study 2 (7-9y)") +
theme(text = element_text(size = 28),
axis.text.x = element_blank(),
axis.title.y = element_blank(),
panel.grid = element_blank()) # 1000 by 1000
factors_s4 <- fa.sort(fa(d4_all, nfactors = nfactors_d4_all, cor = chosenCorType, rotate = chosenRotType)$loadings[]) %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
left_join(char_plotting_wordings, by = c("item" = "capacity")) %>%
select(wording, starts_with("MR")) %>%
rename(capacity = wording, Factor1 = MR1, Factor2 = MR2) %>% #, Factor3 = MR3) %>%
rownames_to_column(var = "order") %>%
mutate(order = as.numeric(order))
factors_s4_long <- factors_s4 %>%
gather(factor, loading, -capacity, -order) %>%
mutate(factor = factor(gsub("Factor", "F", factor))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# levels = c("F1", "F3", "F2"))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# levels = c("F2", "F1", "F3"))) %>%
arrange(order, factor)
factors_s4_blank1 <- factors_s4_long %>%
mutate(loading = rep(100, length(factors_s4_long$loading)))
# factors_s4_blank2 <- factors_s4_long %>%
# mutate(loading = ifelse(factor == "F1", loading, rep(100, length(factors_s4_long$loading)*2/3)))
factors_s4_blank2 <- factors_s4_long %>%
mutate(loading = ifelse(factor == "F2", loading, rep(100, length(factors_s4_long$loading)*2/3)))
factors_s4_blank3 <- factors_s4_long %>%
mutate(loading = ifelse(factor != "F3", loading, rep(100, length(factors_s4_long$loading)*1/3)))
# ggplot(factors_s4_blank1, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s4_blank2, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s4_blank3, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
ggplot(factors_s4_long, aes(x = factor(factor, labels = c("Body-Heart", "Mind")),
y = reorder(capacity, desc(order)), fill = loading)) +
geom_tile(color = "black") +
geom_text(aes(label = format(round(loading, 2), nsmall = 2)), size = 6) +
scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
guide = guide_colorbar(title = element_blank(),
barheight = 20)) +
scale_x_discrete(position = "top") +
# geom_rect(aes(xmin = 0.51, xmax = 1.49, ymin = 14.55, ymax = 20.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 1.51, xmax = 2.49, ymin = 6.55, ymax = 14.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 2.51, xmax = 3.49, ymin = 0.55, ymax = 6.45),
# alpha = 0, color = "black", size = .5) +
# theme_bw() +
theme_minimal() +
labs(x = "Study 1 (4-6y)") +
theme(text = element_text(size = 28),
axis.text.x = element_blank(),
axis.title.y = element_blank(),
panel.grid = element_blank()) # 1000 by 1000
efa_d4_all_forced3N <- fa(d4_all, nfactors = 3, cor = chosenCorType, rotate = chosenRotType)
factors_s4_3fac <- fa.sort(efa_d4_all_forced3N$loadings[]) %>%
data.frame() %>%
rownames_to_column(var = "item") %>%
left_join(char_plotting_wordings, by = c("item" = "capacity")) %>%
select(wording, starts_with("MR")) %>%
rename(capacity = wording, Factor1 = MR1, Factor2 = MR2, Factor3 = MR3) %>%
rownames_to_column(var = "order") %>%
mutate(order = as.numeric(order))
factors_s4_3fac_long <- factors_s4_3fac %>%
gather(factor, loading, -capacity, -order) %>%
mutate(factor = factor(gsub("Factor", "F", factor))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# levels = c("F1", "F3", "F2"))) %>%
# mutate(factor = factor(gsub("Factor", "F", factor),
# levels = c("F2", "F1", "F3"))) %>%
arrange(order, factor)
factors_s4_3fac_blank1 <- factors_s4_3fac_long %>%
mutate(loading = rep(100, length(factors_s4_3fac_long$loading)))
# factors_s4_3fac_blank2 <- factors_s4_3fac_long %>%
# mutate(loading = ifelse(factor == "F1", loading, rep(100, length(factors_s4_3fac_long$loading)*2/3)))
factors_s4_3fac_blank2 <- factors_s4_3fac_long %>%
mutate(loading = ifelse(factor == "F2", loading, rep(100, length(factors_s4_3fac_long$loading)*2/3)))
factors_s4_3fac_blank3 <- factors_s4_3fac_long %>%
mutate(loading = ifelse(factor != "F3", loading, rep(100, length(factors_s4_3fac_long$loading)*1/3)))
# ggplot(factors_s4_3fac_blank1, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s4_3fac_blank2, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
#
# ggplot(factors_s4_3fac_blank3, aes(x = factor,
# y = reorder(capacity, desc(order)), fill = loading)) +
# geom_tile(color = "black") +
# # geom_text(aes(label = format(round(loading, 2), nsmall = 2))) +
# scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
# guide = guide_colorbar(title = element_blank(),
# barheight = 20)) +
# scale_x_discrete(position = "top") +
# theme_minimal() +
# theme(text = element_text(size = 24),
# axis.text.x = element_text(size = 28),
# axis.title = element_blank(),
# panel.grid = element_blank()) # 1000 by 1000
ggplot(factors_s4_3fac_long, aes(x = factor(factor),
y = reorder(capacity, desc(order)), fill = loading)) +
geom_tile(color = "black") +
geom_text(aes(label = format(round(loading, 2), nsmall = 2)), size = 6) +
scale_fill_distiller(palette = "RdYlBu", limits = c(-1, 1), breaks = c(-1, 0, 1),
guide = guide_colorbar(title = element_blank(),
barheight = 20)) +
scale_x_discrete(position = "top") +
# geom_rect(aes(xmin = 0.51, xmax = 1.49, ymin = 14.55, ymax = 20.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 1.51, xmax = 2.49, ymin = 6.55, ymax = 14.45),
# alpha = 0, color = "black", size = .5) +
# geom_rect(aes(xmin = 2.51, xmax = 3.49, ymin = 0.55, ymax = 6.45),
# alpha = 0, color = "black", size = .5) +
# theme_bw() +
theme_minimal() +
labs(x = "Study 1 (4-6y)") +
theme(text = element_text(size = 28),
axis.text.x = element_blank(),
axis.title.y = element_blank(),
panel.grid = element_blank()) # 1000 by 1000
# factor congruence
factor.congruence(efa_d3_all_rotatedN, efa_d4_all_rotatedN)
MR1 MR2
MR1 0.77 0.13
MR3 0.73 0.16
MR2 0.23 0.87
factor.congruence(efa_d3_all_rotatedN, efa_d4_all_forced3N)
MR1 MR3 MR2
MR1 0.60 0.65 0.21
MR3 0.66 0.51 0.24
MR2 0.10 0.26 0.86
Mean ratings of 40 mental capacities for the 2 entities included in Studies 1-2. Participants responded on a 3-point scale (0 = “no”, 0.5 = “kinda”, 1 = “yes”). Error bars are nonparametric bootstrapped 95% confidence intervals. Mental capacities are grouped according to their dominant factor loading in Study 1 (adults).
# make dataframe
s12_plotting <- char_plotting %>%
filter(study %in% c("study 1", "study 2")) %>%
distinct()
# plot! (ordered by study 3 factor loadings)
s12 <- ggplot(s12_plotting,
aes(y = Mean, x = reorder(wording, desc(s1_order)),
colour = factor(s1_color), shape = study)) +
geom_point(stat = "identity", position = position_dodge(width = 0.6), size = 2) +
geom_errorbar(aes(ymin = Lower, ymax = Upper), width = 0.4,
position = position_dodge(width = 0.6)) +
facet_wrap(~ character) +
theme_bw() +
scale_y_continuous(name = "\nMean rating",
limits = c(0, 1),
breaks = c(0, 0.5, 1),
labels = c("0\n(no)", "0.5\n(kinda)", "1\n(yes)")) +
scale_shape_discrete(name = "Study:",
labels = c("Study 1: adults", "Study 2: 7-9y")) +
# scale_colour_brewer(name = "Factor:",
# type = "qual", palette = 6,
# guide = FALSE) +
scale_colour_manual(name = "Factor:",
values = c("#E41A1C", "#4DAF4A", "#377EB8"),
labels = c("BODY", "MIND", "HEART")) +
coord_flip() +
theme(text = element_text(size = 9),
axis.title.y = element_blank(),
axis.text.y = element_text(face = "italic",
colour = palette_s1),
panel.grid.minor = element_blank(),
legend.position = "right")
s12
Mean ratings of 20 mental capacities for the 9 entities included in Studies 3-4. Participants responded on a 3-point scale (0 = “no”, 0.5 = “kinda”, 1 = “yes”). Error bars are nonparametric bootstrapped 95% confidence intervals. Mental capacities are grouped according to their dominant factor loading in Study 3 (7-9y).
# make dataframe
s34_plotting <- char_plotting %>%
filter(study %in% c("study 3", "study 4"),
!is.na(s3_order), !is.na(character), !is.na(capacity)) %>%
distinct() %>%
mutate(character = factor(character,
levels = c("computer", "doll", "teddy_bear", "robot",
"beetle", "bird", "mouse", "goat", "elephant")))
# plot! (ordered by study 3 factor loadings)
s34 <- ggplot(s34_plotting,
aes(y = Mean, x = reorder(wording, desc(s3_order)),
# colour = study,
colour = s3_color,
shape = study)) +
geom_point(stat = "identity", position = position_dodge(width = 0.6), size = 2) +
geom_errorbar(aes(ymin = Lower, ymax = Upper), width = 0.4,
position = position_dodge(width = 0.6)) +
facet_wrap(~ character, ncol = 9) +
theme_bw() +
scale_y_continuous(name = "\nMean rating",
limits = c(0, 1),
breaks = c(0, 0.5, 1),
labels = c("0\n(no)", "0.5\n(kinda)", "1\n(yes)")) +
scale_shape_discrete(name = "Study:",
labels = c("Study 3: 7-9y", "Study 4: 4-6y")) +
# scale_colour_discrete(name = "Study:",
# labels = c("Study 3: 7-9y", "Study 4: 4-6y")) +
# scale_colour_brewer(name = "Factor:",
# type = "qual", palette = 6,
# guide = FALSE) +
scale_colour_manual(name = "Factor:",
values = c("#E41A1C", "#377EB8", "#4DAF4A"),
labels = c("BODY", "HEART", "MIND")) +
coord_flip() +
theme(text = element_text(size = 9),
axis.title.y = element_blank(),
axis.text.y = element_text(face = "italic"),
# colour = palette_s1),
panel.grid.minor = element_blank(),
legend.position = "bottom")
s34
# tempC <- d1 %>% mutate(subid = paste(character, subid, sep = "_")) %>%
# full_join(d2 %>% mutate(subid = paste(character, subid, sep = "_"))) %>%
# full_join(data.frame(efa_d12_all_rotatedN$scores) %>%
# rownames_to_column("subid") %>%
# gather(factor, score, -subid)) %>%
# mutate(factor = factor(factor),
# age_group = factor(age_group),
# character = factor(character)) # %>%
# # filter(!is.na(factor), !is.na(age_group), !is.na(character))
#
# contrasts(tempC$factor) = cbind(factor1 = c(1, -1, 0),
# factor3 = c(0, -1, 1))
#
# contrasts(tempC$age_group) = cbind(children = c(-1, 1))
# contrasts(tempC$character) = cbind(robot = c(-1, 1))
#
# library(lme4)
# r1 <- lmer(score ~ character * factor * age_group + (1 | subid) , tempC)
# summary(r1)
#
# # library(brms)
# # r1b <- brm(score ~ character * factor * age_group + (1 | subid) , tempC,
# # family = "gaussian")
# # summary(r1b)
# project 7-9yo data into adult space
temp_predict_79 <- predict(efa_d1_all_rotatedN, d2_all, d1_all) %>%
data.frame() %>%
rownames_to_column("subid")
# round(cor(efa_d1_all_rotatedN$scores, temp_predict_79[,-1], use = "complete.obs"), 3)
temp_combo_adult <- efa_d1_all_rotatedN$scores %>% data.frame() %>%
rownames_to_column("subid") %>%
full_join(temp_predict_79)
Joining, by = c("subid", "MR1", "MR2", "MR3")
scores_s12 <- d1 %>%
select(age_group, subid, age, character) %>%
distinct() %>%
mutate(subid = paste(character, subid, sep = "_")) %>%
full_join(d2 %>%
select(age_group, subid, age, character) %>%
distinct() %>%
mutate(subid = paste(character, subid, sep = "_"))) %>%
full_join(temp_combo_adult) %>%
mutate(character = factor(character)) %>%
mutate(age = ifelse(age < 6.5, NA, age)) %>%
rename(score_F1 = MR1, score_F2 = MR2, score_F3 = MR3) %>%
filter(!is.na(score_F1), !is.na(score_F2), !is.na(score_F3), !is.na(age)) %>%
gather(factor, score, starts_with("score_")) %>%
mutate(factor = factor(factor))
Joining, by = c("age_group", "subid", "age", "character")
Column `character` joining factors with different levels, coercing to character vectorJoining, by = "subid"
scores_s12_plotting <- scores_s12 %>%
group_by(age_group, character, factor) %>%
do(data.frame(rbind(smean.cl.boot(.$score))))
# plot
ggplot(scores_s12_plotting %>%
ungroup() %>%
mutate(factor = factor(factor,
labels = c("HEART",
"BODY",
"MIND")),
age_group = factor(age_group,
# levels = c("adults", "children_79"),
# labels = c("adults", "children"))),
levels = c("children_79", "adults"),
labels = c("children", "adults"))),
aes(x = age_group, y = Mean, color = character, shape = character)) +
facet_wrap("factor", ncol = 3) +
theme_bw() +
theme(text = element_text(size = 20),
legend.position = "bottom") +
geom_point(size = 5, position = position_dodge(width = 0.4)) +
geom_errorbar(aes(ymin = Lower, ymax = Upper),
width = 0.1, position = position_dodge(width = 0.4)) +
scale_shape_manual(values = c(19, 15)) +
labs(title = "Factor scores by age group",
# subtitle = "Adults (Study 1) vs. children (Study 2)\n",
x = "Age group",
y = "Mean factor score") # 1000 by 500
ggplot(scores_s3_plotting %>%
ungroup() %>%
mutate(character = factor(character,
levels = c("computer", "robot", "doll", "teddy_bear",
"beetle", "bird", "mouse", "goat", "elephant"),
labels = c("computer", "robot", "doll", "teddy bear",
"beetle", "bird", "mouse", "goat", "elephant")),
factor = factor(factor,
levels = c("score_F2", "score_F1", "score_F3"),
labels = c("Social-emotional", "Bodily", "Perceptual-cognitive"))),
aes(x = character, y = Mean, color = character, shape = character)) +
facet_wrap(~ factor, ncol = 3) +
theme_bw() +
theme(text = element_text(size = 28),
axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5),
legend.position = "none") +
geom_point(size = 5, position = position_dodge(width = 0.4)) +
geom_errorbar(aes(ymin = Lower, ymax = Upper),
width = 0.2, position = position_dodge(width = 0.4)) +
# scale_color_manual(values = c("black", "#00BFC4", "#F8766D", rep("black", 4))) +
# scale_shape_manual(values = c(17, 15, 19, rep(17, 4))) +
scale_color_manual(values = c("black", "#00BFC4", rep("gray", 2), "#F8766D", rep("black", 4))) +
scale_shape_manual(values = c(17, 15, rep(17, 2), 19, rep(17, 4))) +
labs(title = "Factor scores by character",
x = "Character",
y = "Mean factor score") # 1000 by 500
# # Cronbach's alpha (subscales)
# keys.list_s34 <- list(HEART = c("pride", "depressed", "disrespected", "happy",
# "love", "embarrassed", "angry", "guilt"),
# BODY = c("hungry", "odors", "fear", "tired", "pain", "nauseated"),
# MIND = c("temperature", "reasoning", "remembering", "choices",
# "depth", "conscious"))
# scores <- scoreItems(keys.list_s34, d34_all, min = 0, max = 1) # or just use the keys.lit
# # summary(scores)
# scores
#
# # omega
# omega(d34_all, 3, plot = F)
# plot (old way, not projection!)
ggplot(scores_s34_plotting %>%
ungroup() %>%
mutate(character = factor(character,
levels = c("computer", "robot", "doll",
"teddy_bear", "beetle", "bird",
"mouse", "goat", "elephant"),
labels = c("computer", "robot", "doll",
"teddy bear", "beetle", "bird",
"mouse", "goat", "elephant")),
factor = factor(factor,
levels = c("score_F1", "score_F2", "score_F3"),
labels = c("Heart", "Mind", "Body")),
age_group = factor(age_group,
levels = c("children_46", "children_79"),
labels = c("4-6y", "7-9y"))),
aes(x = character, y = Mean,
color = age_group)) +
# color = character,
# shape = age_group)) +
facet_wrap(~ factor, ncol = 3) +
theme_bw() +
theme(text = element_text(size = 28),
axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5),
legend.position = "bottom") +
geom_point(size = 5, position = position_dodge(width = 0.4)) +
geom_errorbar(aes(ymin = Lower, ymax = Upper),
width = 0.2, position = position_dodge(width = 0.4)) +
# scale_color_manual(values = c("black", "#00BFC4", "#F8766D", rep("black", 4))) +
# scale_shape_manual(values = c(17, 15, 19, rep(17, 4))) +
# scale_color_manual(values = c("black", "#00BFC4", rep("gray", 2), "#F8766D", rep("black", 4)),
# guide = FALSE) +
scale_color_brewer(palette = "Set1", direction = -1) +
labs(#title = "Factor scores by character and age group",
x = "Character",
y = "Mean factor score",
color = "Age group: ") # 1000 by 500
scores_s1_plotting <- d1 %>%
select(subid, age, character) %>%
distinct() %>%
mutate(subid = paste(character, subid, sep = "_")) %>%
full_join(efa_d1_all_rotatedN$scores %>%
data.frame() %>%
rownames_to_column("subid")) %>%
mutate(character = factor(character)) %>%
rename(score_F1 = MR1, score_F2 = MR2, score_F3 = MR3) %>%
filter(!is.na(score_F1), !is.na(score_F2), !is.na(score_F3), !is.na(age)) %>%
gather(factor, score, starts_with("score_")) %>%
mutate(factor = factor(factor))
Joining, by = "subid"
ggplot(scores_s1_plotting %>%
ungroup() %>%
mutate(factor = factor(factor,
levels = c("score_F1", "score_F2", "score_F3"),
labels = c("Social-emotional",
"Bodily",
"Perceptual-cognitive"))),
aes(x = age, y = score, color = character, fill = character, shape = character)) +
facet_wrap("factor", ncol = 3) +
theme_bw() +
theme(text = element_text(size = 28),
legend.position = "bottom") +
# geom_smooth(method = "loess", alpha = 0.4) +
geom_smooth(method = "lm", alpha = 0.4) +
geom_point(size = 2) +
scale_shape_manual(values = c(19, 15)) +
labs(title = "Factor scores by adults' age",
# subtitle = "Adults (Study 1)\n",
x = "Age (years)",
y = "Factor score") # 1000 by 500
scores_s2_plotting <- d2 %>%
select(subid, age, character) %>%
distinct() %>%
mutate(subid = paste(character, subid, sep = "_")) %>%
full_join(efa_d2_all_rotatedN$scores %>%
data.frame() %>%
rownames_to_column("subid")) %>%
mutate(character = factor(character)) %>%
rename(score_F1 = MR1, score_F2 = MR2, score_F3 = MR3) %>%
filter(!is.na(score_F1), !is.na(score_F2), !is.na(score_F3), !is.na(age)) %>%
gather(factor, score, starts_with("score_")) %>%
mutate(factor = factor(factor))
Joining, by = "subid"
ggplot(scores_s2_plotting %>%
ungroup() %>%
mutate(factor = factor(factor,
labels = c("Social-emotional",
"Bodily",
"Perceptual-cognitive"))),
aes(x = age, y = score, color = character, fill = character, shape = character)) +
facet_wrap("factor", ncol = 3) +
theme_bw() +
theme(text = element_text(size = 28),
legend.position = "bottom") +
# geom_smooth(method = "loess", alpha = 0.4) +
geom_smooth(method = "lm", alpha = 0.4) +
geom_point(size = 2) +
scale_shape_manual(values = c(19, 15)) +
labs(title = "Factor scores by children's age",
# subtitle = "Children (Study 2)\n",
x = "Age (years)",
y = "Factor score") # 1000 by 500
tempA <- d2 %>%
select(subid, age, character) %>%
distinct() %>%
mutate(subid = paste(character, subid, sep = "_")) %>%
full_join(scores_s12) %>%
mutate(character = factor(character)) %>%
filter(age_group == "children_79", !is.na(score), !is.na(age)) %>%
# spread(factor, score) %>%
# filter(!is.na(score_F1), !is.na(score_F2), !is.na(score_F3), !is.na(age)) %>%
# gather(factor, score, starts_with("score_")) %>%
mutate(factor = factor(factor,
# labels = c("Social-emotional",
# "Bodily",
# "Perceptual-cognitive")))
labels = c("HEART",
"BODY",
"MIND")))
Joining, by = c("subid", "age", "character")
Column `character` joining factors with different levels, coercing to character vector
tempB <- scores_s12_plotting %>%
filter(age_group == "adults") %>%
ungroup() %>%
mutate(factor = factor(factor,
# labels = c("Social-emotional",
# "Bodily",
# "Perceptual-cognitive")),
labels = c("HEART",
"BODY",
"MIND")),
age = 11) %>%
distinct()
ggplot(tempA,
aes(x = age, y = score, color = character, fill = character, shape = character)) +
facet_wrap("factor", ncol = 3) +
theme_bw() +
theme(text = element_text(size = 20),
axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1),
legend.position = "bottom") +
# geom_smooth(method = "loess", alpha = 0.4) +
geom_smooth(method = "lm", alpha = 0.4) +
geom_point(size = 2) +
geom_point(data = tempB %>%
mutate(factor(factor)),
aes(y = Mean),
size = 4, position = position_dodge(width = 0.6)) +
geom_errorbar(data = tempB, aes(ymin = Lower, ymax = Upper, y = Mean), width = 0.4,
position = position_dodge(width = 0.6)) +
scale_shape_manual(values = c(19, 15)) +
scale_x_continuous(breaks = c(7:11), labels = c("7y", "8y", "9y", "10y", "adults")) +
labs(#title = "Factor scores by age",
# subtitle = "Children (Study 2)\n",
x = "Age",
y = "Factor score") # 1000 by 500
Ignoring unknown aesthetics: y
# scores_s34_plotting <- d3 %>%
# select(age_group, subid, age, character) %>%
# distinct() %>%
# mutate(subid = paste(character, subid, sep = "_")) %>%
# full_join(d4 %>%
# select(age_group, subid, age, character) %>%
# distinct() %>%
# mutate(subid = paste(character, subid, sep = "_"))) %>%
# full_join(efa_d34_all_rotatedN$scores %>%
# data.frame() %>%
# rownames_to_column("subid")) %>%
# mutate(character = factor(character)) %>%
# mutate(age = ifelse(age < 3.5, NA, age)) %>%
# rename(score_F1 = MR1, score_F2 = MR2, score_F3 = MR3) %>%
# filter(!is.na(score_F1), !is.na(score_F2), !is.na(score_F3), !is.na(age)) %>%
# gather(factor, score, starts_with("score_")) %>%
# mutate(factor = factor(factor))
# project 4-6yo data into 7-9yo space
temp_predict <- predict(efa_d3_all_rotatedN, d4_all, d3_all) %>%
data.frame() %>%
rownames_to_column("subid")
# round(cor(efa_d4_all_rotatedN$scores, temp_predict, use = "complete.obs"), 3)
temp_combo <- efa_d3_all_rotatedN$scores %>% data.frame() %>%
rownames_to_column("subid") %>%
full_join(temp_predict)
Joining, by = c("subid", "MR1", "MR3", "MR2")
scores_s34_plotting <- d3 %>%
select(age_group, subid, age, character) %>%
distinct() %>%
mutate(subid = paste(character, subid, sep = "_")) %>%
full_join(d4 %>%
select(age_group, subid, age, character) %>%
distinct() %>%
mutate(subid = paste(character, subid, sep = "_"))) %>%
full_join(temp_combo) %>%
mutate(character = factor(character)) %>%
mutate(age = ifelse(age < 3.5, NA, age)) %>%
rename(score_F1 = MR1, score_F2 = MR2, score_F3 = MR3) %>%
filter(!is.na(score_F1), !is.na(score_F2), !is.na(score_F3), !is.na(age)) %>%
gather(factor, score, starts_with("score_")) %>%
mutate(factor = factor(factor))
Joining, by = c("age_group", "subid", "age", "character")
Column `character` joining factors with different levels, coercing to character vectorJoining, by = "subid"
# ggplot(scores_s34_plotting %>%
# ungroup() %>%
# mutate(factor = factor(factor,
# levels = c("score_F1", "score_F2", "score_F3"),
# labels = c("Heart",
# "Mind",
# "Body")),
# character = factor(character,
# levels = c("computer", "robot", "doll", "teddy_bear",
# "beetle", "bird", "mouse", "goat", "elephant"))),
# # aes(x = age, y = score, color = character, fill = character, shape = character)) +
# aes(x = age, y = score, group = age_group)) +
# # facet_wrap("factor", ncol = 3) +
# facet_grid(factor ~ character) +
# # facet_grid(character ~ factor) +
# theme_bw() +
# theme(text = element_text(size = 28),
# legend.position = "none") +
# # geom_smooth(method = "loess", alpha = 0.4) +
# geom_smooth(method = "lm", alpha = 0.4) +
# # geom_smooth(method = "lm", alpha = 0.4, formula = y ~ poly(x, 2)) +
# # geom_smooth(method = "lm", alpha = 0.4, formula = y ~ poly(x, 3)) +
# geom_point(size = 2) +
# scale_x_continuous(breaks = seq(2, 12, 2)) +
# # scale_fill_manual(values = c("black", "#00BFC4", rep("gray", 2), "#F8766D", rep("black", 4))) +
# # scale_color_manual(values = c("black", "#00BFC4", rep("gray", 2), "#F8766D", rep("black", 4))) +
# # scale_shape_manual(values = c(17, 15, rep(17, 2), 19, rep(17, 4))) +
# labs(title = "Factor scores by children's age",
# # subtitle = "Children (Studies 3-4)\n",
# x = "Age (years)",
# y = "Factor score") # 1000 by 500
#
#
ggplot(scores_s34_plotting %>%
ungroup() %>%
mutate(factor = factor(factor,
levels = c("score_F1", "score_F3", "score_F2"),
labels = c("BODY", "HEART", "MIND")),
# levels = c("score_F1", "score_F2", "score_F3"),
# labels = c("Heart",
# "Mind",
# "Body")),
character = factor(gsub("_", " ", character),
levels = c("computer", "robot", "doll",
"teddy bear", "beetle", "bird",
"mouse", "goat", "elephant")),
age_group = factor(age_group,
levels = c("children_46", "children_79"))),
aes(x = age, y = score)) +
# aes(x = age, y = score, group = age_group)) +
# facet_wrap("factor", ncol = 3) +
facet_grid(factor ~ character) +
# facet_grid(character ~ factor) +
theme_bw() +
theme(text = element_text(size = 28),
legend.position = "bottom") +
# geom_smooth(method = "loess", alpha = 0.4) +
geom_smooth(method = "lm", alpha = 0.2, color = "black") +
# geom_smooth(method = "lm", alpha = 0.4, formula = y ~ poly(x, 2)) +
# geom_smooth(method = "lm", alpha = 0.4, formula = y ~ poly(x, 3)) +
geom_point(size = 2, aes(color = age_group)) +
scale_x_continuous(breaks = seq(2, 12, 2)) +
# scale_fill_manual(values = c("black", "#00BFC4", rep("gray", 2), "#F8766D", rep("black", 4))) +
# scale_color_manual(values = c("black", "#00BFC4", rep("gray", 2), "#F8766D", rep("black", 4))) +
# scale_shape_manual(values = c(17, 15, rep(17, 2), 19, rep(17, 4))) +
scale_color_brewer("Age group", labels = c("4-6y", "7-9y"),
palette = "Set1", direction = -1) +
labs(#title = "Factor scores by children's age",
# subtitle = "Children (Studies 3-4)\n",
x = "Age (years)",
y = "Factor score") # 1000 by 500
contrasts(scores_s34_plotting$factor) <-
cbind(heart = c(1, 0, -1),
mind = c(0, 1, -1))
contrasts(scores_s34_plotting$character) <-
cbind(animate = c(5, 5, -4, -4, 5, 5, 5, -4, -4),
mammal = c(-3, -3, 0, 0, 2, 2, 2, 0, 0),
elephant = c(0, 0, 0, 0, 2, -1, -1, 0, 0),
goat = c(0, 0, 0, 0, 0, 1, -1, 0, 0),
bird = c(-1, 1, 0, 0, 0, 0, 0, 0, 0),
tech = c(0, 0, 1, -1, 0, 0, 0, 1, -1),
robot = c(0, 0, -1, 0, 0, 0, 0, 1, 0),
teddy = c(0, 0, 0, -1, 0, 0, 0, 0, 1))
# reg_temp <- lmer(score ~ factor * character * scale(age, scale = F) + (1 | character) + (1 | subid), data = scores_s34_plotting)
# summary(reg_temp)
pvals <- data.frame()
for(i in levels(scores_s34_plotting$character)) {
for(j in levels(scores_s34_plotting$factor)) {
res <- summary(lm(score ~ scale(age, scale = F),
data = scores_s34_plotting %>% filter(character == i, factor == j)))
p <- round(res$coefficients[2, 4], 3)
pvals[i, j] <- p
}
}
pvals <- pvals %>%
select(score_F3, score_F1, score_F2) %>%
rownames_to_column("character") %>%
mutate(character = factor(character,
levels = c("computer", "robot", "doll", "teddy_bear",
"beetle", "bird", "mouse", "goat", "elephant"))) %>%
arrange(character)
pvals
pvals %>%
gather(factor, p, -character) %>%
filter(p < 0.05/(nrow(pvals) * ncol(pvals))) %>%
spread(factor, p)
pvals_cat <- data.frame()
for(i in levels(scores_s34_plotting$character)) {
for(j in levels(scores_s34_plotting$factor)) {
res <- summary(lm(score ~ age_group,
data = scores_s34_plotting %>% filter(character == i, factor == j)))
p <- round(res$coefficients[2, 4], 3)
pvals_cat[i, j] <- p
}
}
pvals_cat <- pvals_cat %>%
select(score_F3, score_F1, score_F2) %>%
rownames_to_column("character") %>%
mutate(character = factor(character,
levels = c("computer", "robot", "doll", "teddy_bear",
"beetle", "bird", "mouse", "goat", "elephant"))) %>%
arrange(character)
pvals_cat
pvals_cat %>%
gather(factor, p, -character) %>%
filter(p < 0.05/(nrow(pvals_cat) * ncol(pvals_cat))) %>%
spread(factor, p)
ggplot(scores_s34_plotting %>%
mutate(factor = factor(factor,
levels = c("score_F1", "score_F3", "score_F2"),
labels = c("BODY", "HEART", "MIND"))) %>%
spread(factor, score),
aes(x = BODY, y = HEART,
color = age_group, fill = age_group, group = age_group)) +
geom_point() +
geom_smooth(method = "lm", alpha = 0.2) +
theme_bw()
ggplot(scores_s34_plotting %>%
mutate(factor = factor(factor,
levels = c("score_F1", "score_F3", "score_F2"),
labels = c("BODY", "HEART", "MIND"))) %>%
spread(factor, score),
aes(x = BODY, y = MIND,
color = age_group, fill = age_group, group = age_group)) +
geom_point() +
geom_smooth(method = "lm", alpha = 0.2) +
theme_bw()
ggplot(scores_s34_plotting %>%
mutate(factor = factor(factor,
levels = c("score_F1", "score_F3", "score_F2"),
labels = c("BODY", "HEART", "MIND"))) %>%
spread(factor, score),
aes(x = HEART, y = MIND,
color = age_group, fill = age_group, group = age_group)) +
geom_point() +
geom_smooth(method = "lm", alpha = 0.2) +
theme_bw()
scores_s34_plotting %>%
filter(age_group == "children_79") %>%
mutate(factor = factor(factor,
levels = c("score_F1", "score_F3", "score_F2"),
labels = c("BODY", "HEART", "MIND"))) %>%
spread(factor, score) %>%
select(BODY, HEART, MIND) %>%
cor()
BODY HEART MIND
BODY 1.0000000 0.5421433 0.4496306
HEART 0.5421433 1.0000000 0.4007229
MIND 0.4496306 0.4007229 1.0000000
scores_s34_plotting %>%
filter(age_group == "children_46") %>%
mutate(factor = factor(factor,
levels = c("score_F1", "score_F3", "score_F2"),
labels = c("BODY", "HEART", "MIND"))) %>%
spread(factor, score) %>%
select(BODY, HEART, MIND) %>%
cor()
BODY HEART MIND
BODY 1.0000000 0.6991161 0.6053140
HEART 0.6991161 1.0000000 0.6392113
MIND 0.6053140 0.6392113 1.0000000
scores_s34_lm <- scores_s34_plotting %>%
filter(age_group == "children_46") %>%
mutate(factor = factor(factor,
levels = c("score_F1", "score_F3", "score_F2"),
labels = c("BODY", "HEART", "MIND"))) %>%
spread(factor, score)
summary(lmer(HEART ~ BODY * scale(age, scale = F) + (1 | character),
scores_s34_lm))
Linear mixed model fit by REML ['lmerMod']
Formula: HEART ~ BODY * scale(age, scale = F) + (1 | character)
Data: scores_s34_lm
REML criterion at convergence: 230
Scaled residuals:
Min 1Q Median 3Q Max
-2.3760 -0.5772 -0.2183 0.7973 2.3606
Random effects:
Groups Name Variance Std.Dev.
character (Intercept) 0.02187 0.1479
Residual 0.38421 0.6198
Number of obs: 115, groups: character, 9
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.059349 0.077177 0.769
BODY 0.730164 0.072043 10.135
scale(age, scale = F) -0.163135 0.089169 -1.830
BODY:scale(age, scale = F) 0.003734 0.089871 0.042
Correlation of Fixed Effects:
(Intr) BODY s(,s=F
BODY 0.163
scl(g,sc=F) -0.027 -0.084
BODY:(,s=F) -0.048 0.032 0.233
summary(lmer(MIND ~ BODY * scale(age, scale = F) + (1 | character),
scores_s34_lm))
Linear mixed model fit by REML ['lmerMod']
Formula: MIND ~ BODY * scale(age, scale = F) + (1 | character)
Data: scores_s34_lm
REML criterion at convergence: 270.2
Scaled residuals:
Min 1Q Median 3Q Max
-2.2049 -0.6245 -0.1414 0.5812 2.2751
Random effects:
Groups Name Variance Std.Dev.
character (Intercept) 0.01887 0.1374
Residual 0.55851 0.7473
Number of obs: 115, groups: character, 9
Fixed effects:
Estimate Std. Error t value
(Intercept) -0.332875 0.084851 -3.923
BODY 0.662356 0.084028 7.883
scale(age, scale = F) 0.005836 0.106831 0.055
BODY:scale(age, scale = F) -0.033039 0.108062 -0.306
Correlation of Fixed Effects:
(Intr) BODY s(,s=F
BODY 0.172
scl(g,sc=F) -0.028 -0.078
BODY:(,s=F) -0.053 0.027 0.234
summary(lmer(HEART ~ MIND * scale(age, scale = F) + (1 | character),
scores_s34_lm))
Linear mixed model fit by REML ['lmerMod']
Formula: HEART ~ MIND * scale(age, scale = F) + (1 | character)
Data: scores_s34_lm
REML criterion at convergence: 240.8
Scaled residuals:
Min 1Q Median 3Q Max
-2.1222 -0.6935 -0.1318 0.6780 2.1731
Random effects:
Groups Name Variance Std.Dev.
character (Intercept) 0.06609 0.2571
Residual 0.40525 0.6366
Number of obs: 115, groups: character, 9
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.20037 0.10869 1.844
MIND 0.59260 0.06617 8.955
scale(age, scale = F) -0.13866 0.09544 -1.453
MIND:scale(age, scale = F) -0.08754 0.09148 -0.957
Correlation of Fixed Effects:
(Intr) MIND s(,s=F
MIND 0.278
scl(g,sc=F) -0.031 -0.060
MIND:(,s=F) -0.049 -0.033 0.335
# plot! (ordered by study 3 factor loadings)
s34_all_cat <- ggplot(d34_all %>%
rownames_to_column("subid") %>%
mutate(subid = gsub(".*_", "", subid),
subid = as.character(subid)) %>%
left_join(d3 %>%
select(subid, study, character) %>%
mutate(subid = as.character(subid)) %>%
distinct() %>%
full_join(d4 %>%
select(subid, study, character) %>%
mutate(subid = as.character(subid)) %>%
distinct())) %>%
mutate(study = factor(study,
levels = c("study 4", "study 3"),
labels = c("4-6y", "7-9y"))) %>%
gather(capacity, response, angry:tired) %>%
# filter(!is.na(response)) %>%
full_join(s34_plotting %>%
select(capacity, s3_factor, s3_order)) %>%
left_join(char_plotting_wordings) %>%
mutate(wording = reorder(wording, s3_order),
character = factor(character,
levels = c("elephant", "goat", "mouse",
"bird", "beetle",
"teddy_bear", "doll",
"robot", "computer"))),
aes(x = study,
fill = study,
alpha = factor(response))) +
geom_bar(position = "fill", color = "black") +
scale_fill_brewer(name = "Study:", palette = "Set1", direction = -1) +
scale_alpha_discrete(name = "Response:", labels = c("NO", "KINDA", "YES"),
na.value = 0) +
theme_bw() +
theme(text = element_text(),
axis.title.x = element_blank(),
axis.text.x = element_text(angle = 90, hjust = 1),
legend.position = "bottom") +
labs(x = "Study",
y = "Proportion of Responses") +
# coord_flip() +
facet_grid(character ~ wording,
labeller = labeller(wording = label_wrap_gen(10)))
Joining, by = c("subid", "study", "character")
Column `study` joining factors with different levels, coercing to character vectorColumn `character` joining factors with different levels, coercing to character vectorJoining, by = "subid"
Joining, by = "capacity"
Joining, by = "capacity"
# facet_wrap(~ wording, ncol = 5)
s34_all_cat
# plot! (ordered by study 3 factor loadings)
s34_robot_cat <- ggplot(d34_all %>%
rownames_to_column("subid") %>%
filter(grepl("robot", subid)) %>%
mutate(subid = gsub("robot_", "", subid),
subid = as.character(subid)) %>%
left_join(d3 %>%
select(subid, study) %>%
mutate(subid = as.character(subid)) %>%
distinct() %>%
full_join(d4 %>%
select(subid, study) %>%
mutate(subid = as.character(subid)) %>%
distinct())) %>%
mutate(study = factor(study,
levels = c("study 4", "study 3"),
labels = c("4-6y", "7-9y"))) %>%
gather(capacity, response, angry:tired) %>%
full_join(s34_plotting %>%
select(capacity, wording, s3_factor, s3_order)) %>%
mutate(wording = reorder(wording, s3_order)),
aes(x = study,
fill = study,
alpha = factor(response))) +
geom_bar(position = "fill", color = "black") +
scale_fill_brewer(name = "Study:", palette = "Set1", direction = -1) +
scale_alpha_discrete(name = "Response:", labels = c("NO", "KINDA", "YES"),
na.value = 0) +
theme_bw() +
theme(text = element_text(),
axis.title.x = element_blank(),
axis.text.x = element_text(angle = 90, hjust = 1),
legend.position = "top") +
labs(x = "Study",
y = "Proportion of Responses") +
# coord_flip() +
# facet_grid(capacity ~ ., switch = "y")
facet_wrap(~ wording, ncol = 5)
Joining, by = c("subid", "study")
Column `study` joining factors with different levels, coercing to character vectorJoining, by = "subid"
Joining, by = "capacity"
s34_robot_cat
ggplot(d3_all %>%
rownames_to_column("subid") %>%
gather(capacity, response, -subid) %>%
mutate(age_group = "7-9y") %>%
full_join(d4_all %>%
rownames_to_column("subid") %>%
gather(capacity, response, -subid) %>%
mutate(age_group = "4-6y")) %>%
mutate(response_cat = factor(response,
levels = c(0, 0.5, 1),
labels = c("no", "kinda", "yes"))),
aes(x = age_group,
fill = age_group,
alpha = response_cat)) +
geom_bar(position = "fill", color = "black") +
scale_fill_brewer(name = "Study:", palette = "Set1", direction = -1) +
scale_alpha_discrete(name = "Response:", labels = c("NO", "KINDA", "YES"),
na.value = 0) +
theme_bw() +
theme(text = element_text(),
axis.title.x = element_blank(),
axis.text.x = element_text(angle = 90, hjust = 1),
legend.position = "top") +
labs(x = "Study",
y = "Proportion of Responses")
Joining, by = c("subid", "capacity", "response", "age_group")
# 7-9y
d3_all %>% rownames_to_column("subid") %>% gather(key, value, -subid) %>% mutate(value = as.numeric(gsub(0.5, 1, value))) %>% spread(key, value) %>% remove_rownames() %>% column_to_rownames("subid") %>% fa(nfactors = 6, rotate = "none", fm = "minres") %>% fa.sort()
Factor Analysis using method = minres
Call: fa(r = ., nfactors = 6, rotate = "none", fm = "minres")
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 h2 u2 com
fear 0.79 -0.16 -0.18 0.14 -0.06 0.09 0.71 0.29 1.3
angry 0.79 -0.16 0.03 -0.10 -0.14 0.10 0.69 0.31 1.2
tired 0.75 0.07 0.00 0.09 0.16 -0.12 0.62 0.38 1.2
depressed 0.75 -0.23 0.18 -0.17 0.02 0.05 0.67 0.33 1.4
hungry 0.74 -0.03 -0.50 0.12 -0.07 0.07 0.83 0.17 1.8
love 0.70 -0.16 -0.02 0.16 0.13 -0.09 0.56 0.44 1.3
happy 0.70 -0.19 -0.02 -0.28 -0.08 -0.29 0.69 0.31 1.9
pain 0.70 -0.17 -0.22 -0.13 0.02 -0.07 0.58 0.42 1.4
pride 0.69 -0.21 0.23 -0.14 -0.20 -0.15 0.65 0.35 1.8
odors 0.62 -0.01 -0.37 0.16 -0.01 0.04 0.55 0.45 1.8
disrespected 0.58 -0.22 0.23 -0.12 0.19 0.17 0.52 0.48 2.3
nauseated 0.52 0.11 -0.25 -0.07 0.04 0.26 0.42 0.58 2.1
conscious 0.50 0.17 0.06 0.11 0.30 -0.16 0.42 0.58 2.3
embarrassed 0.50 -0.10 0.40 0.07 0.04 0.22 0.47 0.53 2.5
reasoning 0.44 0.64 0.00 0.08 0.02 -0.21 0.65 0.35 2.1
remembering 0.37 0.59 0.14 0.15 -0.31 0.06 0.63 0.37 2.7
choices 0.49 0.50 0.11 -0.09 -0.09 -0.05 0.52 0.48 2.2
temperature 0.39 0.47 0.11 -0.21 -0.06 0.16 0.46 0.54 2.9
depth 0.31 0.43 0.11 -0.06 0.31 0.09 0.40 0.60 3.0
guilt 0.42 -0.28 0.43 0.41 -0.10 -0.03 0.62 0.38 3.8
MR1 MR2 MR3 MR4 MR5 MR6
SS loadings 7.35 1.82 1.06 0.54 0.47 0.41
Proportion Var 0.37 0.09 0.05 0.03 0.02 0.02
Cumulative Var 0.37 0.46 0.51 0.54 0.56 0.58
Proportion Explained 0.63 0.16 0.09 0.05 0.04 0.04
Cumulative Proportion 0.63 0.79 0.88 0.92 0.96 1.00
Mean item complexity = 2.1
Test of the hypothesis that 6 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 10.74 with Chi Square of 1229.69
The degrees of freedom for the model are 85 and the objective function was 0.98
The root mean square of the residuals (RMSR) is 0.03
The df corrected root mean square of the residuals is 0.04
The harmonic number of observations is 123 with the empirical chi square 39.19 with prob < 1
The total number of observations was 123 with Likelihood Chi Square = 108.38 with prob < 0.044
Tucker Lewis Index of factoring reliability = 0.948
RMSEA index = 0.058 and the 90 % confidence intervals are 0.008 0.072
BIC = -300.66
Fit based upon off diagonal values = 0.99
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.98 0.90 0.88 0.77 0.72 0.71
Multiple R square of scores with factors 0.95 0.82 0.77 0.59 0.51 0.50
Minimum correlation of possible factor scores 0.91 0.63 0.54 0.18 0.03 0.00
d3_all %>% rownames_to_column("subid") %>% gather(key, value, -subid) %>% mutate(value = as.numeric(gsub(0.5, 1, value))) %>% spread(key, value) %>% remove_rownames() %>% column_to_rownames("subid") %>% fa(nfactors = 3, rotate = "oblimin", fm = "minres") %>% fa.sort()
Factor Analysis using method = minres
Call: fa(r = ., nfactors = 3, rotate = "oblimin", fm = "minres")
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR3 MR2 h2 u2 com
depressed 0.73 0.13 0.01 0.66 0.34 1.1
pride 0.70 0.06 0.04 0.56 0.44 1.0
embarrassed 0.68 -0.21 0.13 0.40 0.60 1.3
disrespected 0.67 0.00 -0.01 0.44 0.56 1.0
guilt 0.66 -0.16 -0.06 0.33 0.67 1.1
angry 0.57 0.31 0.05 0.65 0.35 1.6
happy 0.48 0.31 0.00 0.50 0.50 1.7
love 0.45 0.34 0.02 0.51 0.49 1.9
tired 0.37 0.31 0.28 0.57 0.43 2.8
hungry -0.05 0.92 0.04 0.82 0.18 1.0
odors -0.01 0.71 0.06 0.54 0.46 1.0
fear 0.35 0.58 0.00 0.68 0.32 1.6
pain 0.29 0.55 -0.04 0.55 0.45 1.5
nauseated 0.02 0.47 0.18 0.33 0.67 1.3
reasoning -0.12 0.08 0.77 0.60 0.40 1.1
choices 0.09 -0.01 0.69 0.52 0.48 1.0
remembering -0.01 -0.05 0.68 0.44 0.56 1.0
temperature 0.07 -0.04 0.60 0.37 0.63 1.0
depth 0.04 -0.06 0.53 0.27 0.73 1.0
conscious 0.24 0.12 0.31 0.28 0.72 2.2
MR1 MR3 MR2
SS loadings 4.12 3.28 2.61
Proportion Var 0.21 0.16 0.13
Cumulative Var 0.21 0.37 0.50
Proportion Explained 0.41 0.33 0.26
Cumulative Proportion 0.41 0.74 1.00
With factor correlations of
MR1 MR3 MR2
MR1 1.00 0.56 0.32
MR3 0.56 1.00 0.38
MR2 0.32 0.38 1.00
Mean item complexity = 1.4
Test of the hypothesis that 3 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 10.74 with Chi Square of 1229.69
The degrees of freedom for the model are 133 and the objective function was 1.67
The root mean square of the residuals (RMSR) is 0.05
The df corrected root mean square of the residuals is 0.06
The harmonic number of observations is 123 with the empirical chi square 99.6 with prob < 0.99
The total number of observations was 123 with Likelihood Chi Square = 187.7 with prob < 0.0013
Tucker Lewis Index of factoring reliability = 0.923
RMSEA index = 0.066 and the 90 % confidence intervals are 0.037 0.077
BIC = -452.32
Fit based upon off diagonal values = 0.98
Measures of factor score adequacy
MR1 MR3 MR2
Correlation of scores with factors 0.94 0.95 0.91
Multiple R square of scores with factors 0.89 0.91 0.83
Minimum correlation of possible factor scores 0.78 0.82 0.66
# 4-6y
d4_all %>% rownames_to_column("subid") %>% gather(key, value, -subid) %>% mutate(value = as.numeric(gsub(0.5, 1, value))) %>% spread(key, value) %>% remove_rownames() %>% column_to_rownames("subid") %>% fa(nfactors = 6, rotate = "none", fm = "minres") %>% fa.sort()
An ultra-Heywood case was detected. Examine the results carefully
Factor Analysis using method = minres
Call: fa(r = ., nfactors = 6, rotate = "none", fm = "minres")
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 h2 u2 com
tired 0.75 0.05 -0.06 0.03 -0.24 0.00 0.62 0.3790 1.2
hungry 0.74 -0.20 -0.22 -0.05 -0.23 0.08 0.70 0.3033 1.6
disrespected 0.68 -0.06 0.05 -0.29 0.02 -0.19 0.59 0.4118 1.6
angry 0.67 -0.02 0.01 -0.35 -0.17 -0.19 0.64 0.3584 1.8
pride 0.65 -0.15 0.15 -0.07 0.25 0.09 0.54 0.4570 1.6
happy 0.64 -0.24 0.28 0.25 0.18 -0.02 0.64 0.3569 2.2
nauseated 0.63 -0.21 -0.14 0.01 -0.02 -0.07 0.47 0.5333 1.4
reasoning 0.61 0.47 -0.39 -0.21 0.42 0.18 1.00 -0.0016 4.1
fear 0.59 -0.19 0.01 0.16 -0.05 0.24 0.47 0.5262 1.8
depressed 0.59 -0.12 0.09 -0.14 0.08 -0.25 0.46 0.5429 1.6
odors 0.57 -0.21 -0.18 -0.13 -0.08 0.24 0.49 0.5083 2.1
embarrassed 0.56 -0.10 -0.06 0.16 -0.01 0.05 0.35 0.6513 1.3
guilt 0.55 0.16 -0.15 0.12 0.14 -0.15 0.41 0.5911 1.7
choices 0.54 0.05 -0.01 0.14 0.08 -0.24 0.38 0.6211 1.6
love 0.54 -0.29 0.23 0.10 0.25 0.11 0.51 0.4894 2.7
pain 0.53 -0.02 0.04 -0.07 -0.16 0.06 0.31 0.6877 1.3
temperature 0.50 0.31 -0.01 0.32 -0.03 -0.18 0.49 0.5123 2.8
depth 0.45 0.30 0.00 0.17 -0.12 -0.10 0.35 0.6532 2.4
remembering 0.45 0.19 -0.19 0.25 -0.15 0.15 0.38 0.6221 3.0
conscious 0.55 0.52 0.59 -0.15 -0.12 0.21 1.00 -0.0028 3.5
MR1 MR2 MR3 MR4 MR5 MR6
SS loadings 7.09 1.11 0.83 0.67 0.59 0.51
Proportion Var 0.35 0.06 0.04 0.03 0.03 0.03
Cumulative Var 0.35 0.41 0.45 0.49 0.51 0.54
Proportion Explained 0.66 0.10 0.08 0.06 0.05 0.05
Cumulative Proportion 0.66 0.76 0.84 0.90 0.95 1.00
Mean item complexity = 2.1
Test of the hypothesis that 6 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 8.67 with Chi Square of 984.43
The degrees of freedom for the model are 85 and the objective function was 0.84
The root mean square of the residuals (RMSR) is 0.03
The df corrected root mean square of the residuals is 0.05
The harmonic number of observations is 120 with the empirical chi square 45.72 with prob < 1
The total number of observations was 122 with Likelihood Chi Square = 91.71 with prob < 0.29
Tucker Lewis Index of factoring reliability = 0.98
RMSEA index = 0.04 and the 90 % confidence intervals are 0 0.058
BIC = -316.63
Fit based upon off diagonal values = 0.99
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.97 0.93 0.97 0.79 0.86 0.76
Multiple R square of scores with factors 0.95 0.86 0.94 0.62 0.74 0.57
Minimum correlation of possible factor scores 0.90 0.72 0.88 0.25 0.47 0.15
d4_all %>% rownames_to_column("subid") %>% gather(key, value, -subid) %>% mutate(value = as.numeric(gsub(0.5, 1, value))) %>% spread(key, value) %>% remove_rownames() %>% column_to_rownames("subid") %>% fa(nfactors = 2, rotate = "oblimin", fm = "minres") %>% fa.sort()
Factor Analysis using method = minres
Call: fa(r = ., nfactors = 2, rotate = "oblimin", fm = "minres")
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 h2 u2 com
love 0.71 -0.18 0.37 0.63 1.1
pride 0.70 -0.03 0.46 0.54 1.0
hungry 0.69 0.09 0.56 0.44 1.0
happy 0.68 -0.02 0.44 0.56 1.0
nauseated 0.65 0.01 0.43 0.57 1.0
odors 0.64 -0.06 0.37 0.63 1.0
fear 0.62 -0.01 0.38 0.62 1.0
disrespected 0.60 0.11 0.46 0.54 1.1
depressed 0.55 0.07 0.36 0.64 1.0
angry 0.53 0.18 0.44 0.56 1.2
embarrassed 0.47 0.13 0.32 0.68 1.2
tired 0.44 0.40 0.57 0.43 2.0
pain 0.42 0.15 0.28 0.72 1.3
temperature -0.05 0.68 0.42 0.58 1.0
depth -0.06 0.63 0.36 0.64 1.0
reasoning 0.15 0.51 0.38 0.62 1.2
remembering 0.07 0.47 0.26 0.74 1.0
guilt 0.19 0.46 0.35 0.65 1.3
conscious 0.14 0.45 0.31 0.69 1.2
choices 0.29 0.32 0.30 0.70 2.0
MR1 MR2
SS loadings 5.26 2.56
Proportion Var 0.26 0.13
Cumulative Var 0.26 0.39
Proportion Explained 0.67 0.33
Cumulative Proportion 0.67 1.00
With factor correlations of
MR1 MR2
MR1 1.00 0.63
MR2 0.63 1.00
Mean item complexity = 1.2
Test of the hypothesis that 2 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 8.67 with Chi Square of 984.43
The degrees of freedom for the model are 151 and the objective function was 2.02
The root mean square of the residuals (RMSR) is 0.06
The df corrected root mean square of the residuals is 0.07
The harmonic number of observations is 120 with the empirical chi square 160.35 with prob < 0.29
The total number of observations was 122 with Likelihood Chi Square = 226.65 with prob < 6.6e-05
Tucker Lewis Index of factoring reliability = 0.878
RMSEA index = 0.072 and the 90 % confidence intervals are 0.046 0.081
BIC = -498.76
Fit based upon off diagonal values = 0.97
Measures of factor score adequacy
MR1 MR2
Correlation of scores with factors 0.95 0.90
Multiple R square of scores with factors 0.90 0.81
Minimum correlation of possible factor scores 0.80 0.61
# 7-9y
d3_all %>% rownames_to_column("subid") %>% gather(key, value, -subid) %>% mutate(value = as.numeric(gsub(0.5, NA, value))) %>% spread(key, value) %>% remove_rownames() %>% column_to_rownames("subid") %>% fa(nfactors = 6, rotate = "none", fm = "minres") %>% fa.sort()
Matrix was not positive definite, smoothing was doneMatrix was not positive definite, smoothing was doneMatrix was not positive definite, smoothing was doneMatrix was not positive definite, smoothing was doneThe estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
Factor Analysis using method = minres
Call: fa(r = ., nfactors = 6, rotate = "none", fm = "minres")
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 h2 u2 com
angry 0.89 -0.10 -0.05 0.07 -0.14 -0.33 0.93 0.072 1.4
fear 0.86 -0.16 -0.28 0.00 0.18 0.01 0.87 0.132 1.4
tired 0.82 0.08 -0.11 -0.16 0.09 0.17 0.75 0.248 1.2
pride 0.81 -0.28 0.23 -0.28 -0.10 -0.19 0.91 0.088 1.9
depressed 0.80 -0.27 0.15 -0.03 -0.32 0.00 0.84 0.162 1.7
pain 0.80 -0.19 -0.29 -0.09 0.06 0.00 0.76 0.235 1.4
hungry 0.77 -0.02 -0.55 0.07 0.17 -0.04 0.92 0.075 2.0
happy 0.74 -0.18 -0.08 -0.26 -0.18 -0.09 0.70 0.302 1.6
love 0.71 -0.29 0.07 -0.05 0.18 0.17 0.66 0.338 1.6
disrespected 0.69 -0.29 0.31 0.09 -0.16 0.23 0.74 0.263 2.3
odors 0.66 0.01 -0.42 0.10 0.14 -0.07 0.65 0.355 1.9
choices 0.64 0.56 0.15 -0.05 -0.05 -0.06 0.75 0.254 2.1
guilt 0.59 -0.38 0.54 0.23 0.29 -0.03 0.92 0.079 3.6
conscious 0.57 0.34 0.06 -0.10 0.05 0.12 0.47 0.533 1.9
embarrassed 0.53 -0.23 0.50 0.12 0.09 0.08 0.62 0.383 2.6
remembering 0.43 0.70 0.31 0.23 0.14 -0.29 0.93 0.069 3.0
reasoning 0.48 0.68 0.09 -0.11 0.11 0.09 0.74 0.265 2.0
temperature 0.44 0.55 0.04 -0.01 -0.20 -0.03 0.54 0.461 2.2
depth 0.40 0.51 0.05 -0.12 -0.06 0.29 0.52 0.478 2.8
nauseated 0.55 0.06 -0.27 0.58 -0.28 0.16 0.82 0.184 3.1
MR1 MR2 MR3 MR4 MR5 MR6
SS loadings 9.11 2.56 1.58 0.71 0.57 0.50
Proportion Var 0.46 0.13 0.08 0.04 0.03 0.02
Cumulative Var 0.46 0.58 0.66 0.70 0.73 0.75
Proportion Explained 0.61 0.17 0.11 0.05 0.04 0.03
Cumulative Proportion 0.61 0.78 0.88 0.93 0.97 1.00
Mean item complexity = 2.1
Test of the hypothesis that 6 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 40.61 with Chi Square of 4649.56
The degrees of freedom for the model are 85 and the objective function was 23.43
The root mean square of the residuals (RMSR) is 0.03
The df corrected root mean square of the residuals is 0.05
The harmonic number of observations is 79 with the empirical chi square 29.46 with prob < 1
The total number of observations was 123 with Likelihood Chi Square = 2589.13 with prob < 0
Tucker Lewis Index of factoring reliability = -0.303
RMSEA index = 0.517 and the 90 % confidence intervals are 0.475 NA
BIC = 2180.09
Fit based upon off diagonal values = 1
d3_all %>% rownames_to_column("subid") %>% gather(key, value, -subid) %>% mutate(value = as.numeric(gsub(0.5, NA, value))) %>% spread(key, value) %>% remove_rownames() %>% column_to_rownames("subid") %>% fa(nfactors = 3, rotate = "oblimin", fm = "minres") %>% fa.sort()
Matrix was not positive definite, smoothing was doneMatrix was not positive definite, smoothing was doneMatrix was not positive definite, smoothing was done A loading greater than abs(1) was detected. Examine the loadings carefully.Matrix was not positive definite, smoothing was doneThe estimated weights for the factor scores are probably incorrect. Try a different factor extraction method.
Factor Analysis using method = minres
Call: fa(r = ., nfactors = 3, rotate = "oblimin", fm = "minres")
Warning: A Heywood case was detected.
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR3 MR2 h2 u2 com
hungry 1.00 -0.16 0.03 0.90 0.097 1.1
odors 0.80 -0.10 0.08 0.62 0.383 1.1
fear 0.80 0.21 0.00 0.84 0.158 1.1
pain 0.79 0.19 -0.05 0.77 0.233 1.1
tired 0.54 0.21 0.29 0.69 0.313 1.9
angry 0.54 0.40 0.15 0.78 0.223 2.0
happy 0.51 0.36 0.03 0.58 0.422 1.8
nauseated 0.47 0.03 0.14 0.31 0.693 1.2
guilt -0.10 0.88 -0.02 0.69 0.313 1.0
embarrassed -0.19 0.83 0.09 0.60 0.396 1.1
disrespected 0.11 0.74 0.02 0.65 0.352 1.0
pride 0.27 0.69 0.05 0.76 0.239 1.3
depressed 0.32 0.63 0.03 0.72 0.280 1.5
love 0.38 0.53 -0.05 0.59 0.406 1.8
reasoning 0.03 -0.10 0.86 0.72 0.283 1.0
remembering -0.18 0.06 0.84 0.65 0.349 1.1
choices 0.06 0.09 0.81 0.76 0.238 1.0
temperature 0.07 -0.07 0.69 0.50 0.504 1.0
depth 0.05 -0.06 0.63 0.40 0.597 1.0
conscious 0.17 0.11 0.53 0.44 0.557 1.3
MR1 MR3 MR2
SS loadings 5.09 4.21 3.66
Proportion Var 0.25 0.21 0.18
Cumulative Var 0.25 0.47 0.65
Proportion Explained 0.39 0.32 0.28
Cumulative Proportion 0.39 0.72 1.00
With factor correlations of
MR1 MR3 MR2
MR1 1.00 0.48 0.38
MR3 0.48 1.00 0.28
MR2 0.38 0.28 1.00
Mean item complexity = 1.3
Test of the hypothesis that 3 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 40.61 with Chi Square of 4649.56
The degrees of freedom for the model are 133 and the objective function was 25.65
The root mean square of the residuals (RMSR) is 0.05
The df corrected root mean square of the residuals is 0.06
The harmonic number of observations is 79 with the empirical chi square 80.47 with prob < 1
The total number of observations was 123 with Likelihood Chi Square = 2885.57 with prob < 0
Tucker Lewis Index of factoring reliability = 0.102
RMSEA index = 0.43 and the 90 % confidence intervals are 0.399 NA
BIC = 2245.55
Fit based upon off diagonal values = 0.99
# 4-6y
d4_all %>% rownames_to_column("subid") %>% gather(key, value, -subid) %>% mutate(value = as.numeric(gsub(0.5, NA, value))) %>% spread(key, value) %>% remove_rownames() %>% column_to_rownames("subid") %>% fa(nfactors = 6, rotate = "none", fm = "minres") %>% fa.sort()
Factor Analysis using method = minres
Call: fa(r = ., nfactors = 6, rotate = "none", fm = "minres")
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 MR3 MR4 MR5 MR6 h2 u2 com
hungry 0.76 -0.09 0.01 -0.39 0.02 -0.09 0.75 0.25 1.5
tired 0.74 0.06 -0.06 -0.13 -0.16 -0.22 0.64 0.36 1.4
happy 0.69 -0.22 0.31 0.27 0.01 -0.06 0.70 0.30 2.0
angry 0.69 -0.12 -0.45 -0.05 -0.10 0.02 0.71 0.29 1.9
disrespected 0.67 -0.19 -0.31 0.13 0.09 0.21 0.65 0.35 2.0
pride 0.67 -0.19 0.13 0.09 0.10 0.07 0.52 0.48 1.4
nauseated 0.65 -0.13 0.00 -0.06 0.08 0.05 0.46 0.54 1.1
odors 0.63 -0.09 0.01 -0.35 0.00 -0.05 0.53 0.47 1.6
fear 0.62 -0.07 0.24 -0.20 -0.03 -0.05 0.49 0.51 1.6
depressed 0.62 -0.23 -0.13 0.10 -0.33 0.09 0.58 0.42 2.1
love 0.60 -0.29 0.34 0.17 -0.09 -0.02 0.59 0.41 2.4
pain 0.57 -0.07 -0.18 0.06 0.34 -0.25 0.54 0.46 2.4
embarrassed 0.56 -0.01 0.13 0.03 0.27 0.02 0.40 0.60 1.6
conscious 0.56 0.14 -0.21 0.37 0.08 -0.07 0.52 0.48 2.3
choices 0.54 0.13 0.12 0.08 -0.23 0.17 0.42 0.58 1.9
reasoning 0.53 0.29 -0.12 -0.14 0.08 0.24 0.46 0.54 2.4
temperature 0.52 0.49 0.11 0.22 0.07 0.02 0.58 0.42 2.5
guilt 0.51 0.30 0.09 -0.07 0.03 0.31 0.46 0.54 2.5
depth 0.47 0.38 -0.11 0.13 -0.21 -0.30 0.53 0.47 3.5
remembering 0.42 0.40 0.16 -0.16 0.01 -0.06 0.40 0.60 2.6
MR1 MR2 MR3 MR4 MR5 MR6
SS loadings 7.35 1.08 0.79 0.73 0.48 0.47
Proportion Var 0.37 0.05 0.04 0.04 0.02 0.02
Cumulative Var 0.37 0.42 0.46 0.50 0.52 0.55
Proportion Explained 0.67 0.10 0.07 0.07 0.04 0.04
Cumulative Proportion 0.67 0.77 0.85 0.91 0.96 1.00
Mean item complexity = 2
Test of the hypothesis that 6 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 9.83 with Chi Square of 1115.79
The degrees of freedom for the model are 85 and the objective function was 1.3
The root mean square of the residuals (RMSR) is 0.04
The df corrected root mean square of the residuals is 0.05
The harmonic number of observations is 104 with the empirical chi square 51.93 with prob < 1
The total number of observations was 122 with Likelihood Chi Square = 142.11 with prob < 1e-04
Tucker Lewis Index of factoring reliability = 0.856
RMSEA index = 0.084 and the 90 % confidence intervals are 0.052 0.096
BIC = -266.23
Fit based upon off diagonal values = 0.99
Measures of factor score adequacy
MR1 MR2 MR3 MR4 MR5 MR6
Correlation of scores with factors 0.97 0.84 0.83 0.81 0.71 0.71
Multiple R square of scores with factors 0.95 0.70 0.68 0.66 0.51 0.50
Minimum correlation of possible factor scores 0.89 0.40 0.37 0.32 0.02 0.01
d4_all %>% rownames_to_column("subid") %>% gather(key, value, -subid) %>% mutate(value = as.numeric(gsub(0.5, NA, value))) %>% spread(key, value) %>% remove_rownames() %>% column_to_rownames("subid") %>% fa(nfactors = 2, rotate = "oblimin", fm = "minres") %>% fa.sort()
Factor Analysis using method = minres
Call: fa(r = ., nfactors = 2, rotate = "oblimin", fm = "minres")
Standardized loadings (pattern matrix) based upon correlation matrix
MR1 MR2 h2 u2 com
happy 0.73 -0.04 0.50 0.50 1.0
pride 0.72 -0.05 0.48 0.52 1.0
love 0.71 -0.14 0.41 0.59 1.1
depressed 0.70 -0.09 0.42 0.58 1.0
disrespected 0.69 -0.02 0.46 0.54 1.0
hungry 0.68 0.11 0.57 0.43 1.1
nauseated 0.67 0.01 0.45 0.55 1.0
angry 0.65 0.05 0.46 0.54 1.0
odors 0.59 0.06 0.40 0.60 1.0
fear 0.56 0.10 0.39 0.61 1.1
tired 0.55 0.26 0.54 0.46 1.4
pain 0.51 0.07 0.31 0.69 1.0
embarrassed 0.46 0.15 0.31 0.69 1.2
conscious 0.34 0.29 0.31 0.69 2.0
choices 0.31 0.31 0.31 0.69 2.0
temperature -0.03 0.73 0.50 0.50 1.0
remembering -0.04 0.61 0.34 0.66 1.0
depth 0.07 0.51 0.31 0.69 1.0
guilt 0.13 0.49 0.34 0.66 1.1
reasoning 0.17 0.47 0.35 0.65 1.3
MR1 MR2
SS loadings 5.89 2.29
Proportion Var 0.29 0.11
Cumulative Var 0.29 0.41
Proportion Explained 0.72 0.28
Cumulative Proportion 0.72 1.00
With factor correlations of
MR1 MR2
MR1 1.00 0.59
MR2 0.59 1.00
Mean item complexity = 1.2
Test of the hypothesis that 2 factors are sufficient.
The degrees of freedom for the null model are 190 and the objective function was 9.83 with Chi Square of 1115.79
The degrees of freedom for the model are 151 and the objective function was 2.72
The root mean square of the residuals (RMSR) is 0.07
The df corrected root mean square of the residuals is 0.08
The harmonic number of observations is 104 with the empirical chi square 177.48 with prob < 0.069
The total number of observations was 122 with Likelihood Chi Square = 305.58 with prob < 1.5e-12
Tucker Lewis Index of factoring reliability = 0.787
RMSEA index = 0.099 and the 90 % confidence intervals are 0.077 0.107
BIC = -419.83
Fit based upon off diagonal values = 0.97
Measures of factor score adequacy
MR1 MR2
Correlation of scores with factors 0.96 0.89
Multiple R square of scores with factors 0.92 0.79
Minimum correlation of possible factor scores 0.83 0.59